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:
Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Loading
Please sign in to comment