Skip to content
Commit 54e95944 authored by Andrzej Głąbek's avatar Andrzej Głąbek Committed by Carles Cufí
Browse files

tests: clock_control: nrf_onoff_and_bt: Refactor code a bit



- most of initialization can be done once per the test suite
  (clearing of the iteration counter can be moved to particular
  tests where it fits better), so instead of the ZTEST before
  function use the setup one for doing the initialization
- make `clock_dev` and `cli` common variables for all tests
- use K_USEC() instead of Z_TIMEOUT_US(), as the latter is an
  internal Zephyr macro
- instead of `K_USEC(long_timeout ? 300 : 100)` use `K_USEC(300)`
  and `K_USEC(100)` so that their values can be calculated at the
  build time
- modify construction of main loops in tests so that it is more
  exposed when the `test_end` flag is set

Signed-off-by: default avatarAndrzej Głąbek <andrzej.glabek@nordicsemi.no>
parent fd3f22b2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment