Commit Graph

15 Commits (8dab7417aebb14b8f3b73ba679a2882e525066ea)

Author SHA1 Message Date
Przemyslaw Stekiel 4fe068834c tests-events-queue: modify tolerance to percentage form
On some boards without SYSTICK support lp ticker is used to trace system ticks.
Event queue uses system ticker to count delay when callback is to be fired.
New ticker implementation for NRF51_DK provides fast and accurate counter for us ticker which shows inaccuracy of the system ticker(which is based on slow and inaccurate lp ticker). This is why measured error grows linearly and percentage form needs to be used.

Currently we use constant tolerance value equal to: 5 [ms].
This patch modifies tolerance to the following form: 5% of measured time [ms].

In this test the lowest delay is equal to 100 [ms], so 5% corresponds to 5 [ms] tolerance - original value. This means that min tolerance is 5 [ms] so this change should not have negative impact on other targets.
2018-05-25 12:30:52 -05:00
Przemyslaw Stekiel 7227670416 Skip higher level ticker tests for targets with stale ticker target specific drivers.
Since target specific ticker drivers are not ready also features which uses ticker in upper layers may not work correctly and tests for these features.
We need to disable also failing higher level ticker related tests (by adding check if DEVICE_USTICKER symbol is available and raise #error [NOT_SUPPORTED] if not).
2018-05-25 12:17:49 -05:00
Kimmo Vaisanen 990da085d9 Introduce API to query how much time is left for delayed event
If user has initiated a delayed event (either with call_in or call_every),
user might need to know how much time is left until the event is
due to be dispatched.

Added time_left() function can be used to get the remaining time.
2018-05-18 12:55:06 +03:00
Przemyslaw Stekiel 2b68eb19e3 tests-events-timing - print debug info only in case of failure.
In the 'Testing accuracy of equeue semaphore' test case result is printed out in each loop iteration.
Since debug prints should not exist in the final test version I suggest to print information only in case of failure.
Additionally time needed to print single info is equal to ~25 ms (K64F/GCC_ARM). The while loop is designed to execute until 20000 ms elapses, so this print has also impact on number of times the loop is executed (number of semaphore accuracy checks).
2018-02-19 11:59:17 +01:00
Maciej Bocianski f28aef4b01 event queue test: fix out of memory problem for NUCLEO_F070RB 2017-11-03 14:47:20 +01:00
Christopher Haster 4cad764162 Added copyright header to all tests 2017-08-07 12:02:33 -05:00
Martin Kojtal 8f295177ce Merge pull request #4317 from c1728p9/reduce_test_overhead
Reduce test overhead in preperation for CMSIS 5
2017-05-17 10:13:25 +01:00
Bartek Szatkowski 6a0fcd3c58 Reduce test overhead in preparation for CMSIS 5
Reduce RAM consumption so all tests can still be built when using
CMSIS/RTX5. Also reduce clutter by removing the per target stack size
defines in the tests.
2017-05-14 19:25:19 -05:00
Christopher Haster f98a52fb97 Fixed timeout units in events timing test
A units mistake led to passing 20000 seconds instead of 20000 milliseconds
to greentea. The would cause the test to spin for 6 hours if it got stuck
anywhere.
2017-05-12 15:07:48 -05:00
Sam Grove 4103842b2b Merge pull request #3782 from geky/events-callback-inference
events: Add support for infering event type from Callback objects
2017-02-21 10:53:14 -06:00
Christopher Haster 6e920fdfe9 events: Increased test tolerance to +-5ms 2017-02-16 13:26:59 -06:00
Christopher Haster 99ca88a66a events: Added support for infering event type from Callback objects
While limitations in type inference prevent the event helper from
infering the type of generic function objects, there is nothing
technical preventing inference from the Callback class, where the
function type is encoded in the template parameters.

With adoption of the Callback class as the standard function
representation, it makes sense to support events created from
callback objects.
2017-02-15 13:43:52 -06:00
Christopher Haster 1f9e239a7d events: Added equeue platform timing tests
Tests the timer/semaphores at a lower level than the event queue,
which removes a layer of concerns from issues in the rtos timing.
2017-02-15 10:59:46 -06:00
Bogdan Marinescu f16342f321 Removed allocate_failure_test1 from equeue tests
This tests doesn't run on some MCUs with low RAM. According to @geky:

"We may want to omit this test (allocate_failure_test1) for now. It has
had other problems such as overflowing stacks, and allocation failure is
also tested by allocate_failure_test2."
2016-09-30 17:01:23 +03:00
Bogdan Marinescu e7abc11f59 Added mbed-events library
Added mbed-events from https://github.com/ARMMbed/mbed-events. Changes
from upstream:

- the whole code is licensed under the Apache license. Sources and
  headers were updates with this information.
- removed the porting layers for Windows and FreeRTOS and the references
  to these porting layers in equeue_platform.h.
- moved the TESTS directory in mbed-events to the TESTS directory of
  mbed-os.
2016-09-29 18:44:09 +03:00