Commit Graph

11 Commits (8624fdf0a75dad0b1310606df72cb95c97c00adf)

Author SHA1 Message Date
Filip Jagodzinski 5840281682 ROTS: SysTimer: Fix test timing issues
Use a busy loop with non-blocking Semaphore::wait(0) calls instead of a
single Semaphore::wait(osWaitForever) to improve time measurement
accuracy. Looping in Semaphore::wait(0) prevents the board from entering
sleep or deepsleep modes while waiting for the semaphore. By skipping
the overhead wakeup time, we get more accurate timings.
2019-01-18 17:10:39 +01:00
Russ Butler 472ababfef Update deep sleep lock check in tests
When the define LPTICKER_DELAY_TICKS is set deep sleep can be randomly
disallowed when using the low power ticker. This is because a Timer
object, which locks deep sleep, is used to protect from back-to-back
writes to lp tickers which can't support that. This causes tests which
assert that deep sleep is allowed to intermittently fail.

To fix this intermittent failure this patch adds the function
sleep_manager_can_deep_sleep_test_check() which checks if deep sleep
is allowed over a duration. It updates all the tests to use
sleep_manager_can_deep_sleep_test_check() rather
than sleep_manager_can_deep_sleep() so the tests work even if deep
sleep is spuriously blocked.
2018-08-17 09:29:41 -05:00
Martin Kojtal e52bb68f93 tests: astyle fix
All tests should comply to our coding standard now
2018-08-03 10:23:38 +01:00
Przemyslaw Stekiel 6eb66ccd7a TESTS-MBEDMICRO-RTOS-MBED-SYSTIMER: include ticker_free() function in the ticker interface. 2018-08-02 09:48:36 +02:00
jeromecoutant 2550f3d09e Systimer test : compilation error with MBED_TICKLESS
Issue occurs when "MBED_TICKLESS" is added in mbed_app.json,
not when "MBED_TICKLESS" is added in targets.json
2018-07-19 15:50:16 +02:00
Bartek Szatkowski a92ff94904 Fix rebase error 2018-05-25 12:20:10 -05:00
Przemyslaw Stekiel 2b7d7a822b tests-mbedmicro-rtos-mbed-systimer: execute sleep/deepsleep test cases only when SLEEP support is enabled. 2018-05-25 12:04:32 -05:00
Filip Jagodzinski ec59cbb6f8 RTOS: SysTimer: Fix test compilation error on ARM & IAR 2018-04-17 09:38:26 -05:00
Filip Jagodzinski 20013d75d6 RTOS: SysTimer: Update tests
Use a mock ticker object instead of the lp_ticker for update_tick() and get_time() tests.
2018-04-13 10:07:00 +02:00
Russ Butler 044eb1e8ce Update the SysTimer test
Update the SysTimer test to match the updated API. Changes are:
- increment_tick() renamed to _increment_tick() and explicitly
    synchronized
-update_tick() replaced with resume() and a call to suspend() was added
    before this
2018-04-10 10:54:31 -05:00
Filip Jagodzinski 74e0f95cd6 RTOS: SysTimer: Add tests 2018-02-28 14:37:13 +01:00