Commit Graph

15 Commits (mbed-os-6.17.0-rc3)

Author SHA1 Message Date
Lingkai Dong d7ef8f857f CMake: greentea: Add skip reason to ticker test 2021-08-11 11:43:17 +01:00
Robert Walton 40154ee2b1 CMake: greentea: Port mbed-drivers-ticker to CTest
Call add_test in mbed_greentea_add_test and specify mbedhtrun as the
command to run.

An MBED_HTRUN_ARGUMENTS variable has been added, which is a semicolon
separated list of arguments to forward to htrun. The user is required to
pass in any arguments mbedhtrun needs to communicate with the device
under test at CMake configuration time.

We automate passing some of the htrun arguments in CMake using data
provided by mbed_config.cmake or gathered from the CMake environment.
The following arguments are passed to htrun from CMake:

* -f/--image-path
* -e/--enum-host-tests
* -m/--micro
* -R/--reset-timeout

--baud-rate is also passed if the MBED_CONF_PLATFORM_STDIO_BAUD_RATE
config parameter is defined.

Temporary checks have been added to mbed_greentea_add_test to keep the
old flow working until we port all of the greentea tests to CTest. These
checks should be removed after we make all greentea tests runnable by
CTest.
2021-08-10 16:54:03 +01:00
harmut01 86c2d70a5b Greentea: Remove deprecated APIs and use chrono
References to time should do so using std::chrono. We reworked tests in
connectivity and drivers to use std::chrono and new APIs in order to
remove deprecation warnings resulting from deprecated API calls.
This required addition of  a macro for test assertions using std::chrono
values.

As host test "timing_drift_auto" expects time values represented as an
integral number of microseconds, we explicitly provide this in place
using "microseconds{TICKER_TIME}.count()" in the relevant ticker tests.
We recognise this is ugly, but thought it best to descriptively convert
from std::chrono to the host test's required representation.

Co-authored-by: Hari Limaye <hari.limaye@arm.com>
2021-07-29 14:06:27 +01:00
Hari Limaye bfe24ce64d Greentea: Remove unused variable from ticker test
Ticker test contains definition of variable total_ticks, which is unused
in the file since removal of function wait_and_print() in commit
aaa15bcf58
2021-07-21 12:21:58 +01:00
jeromecoutant d9204d06eb generic_tests update for targets without LED1 2021-07-06 17:13:45 +02:00
Hari Limaye f95052cf6f CMake: Require TEST_SOURCES in greentea CMake file
Assumption that greentea test file is always named main.cpp is
incorrect. Updated mbed_greentea_add_test() macro to make TEST_SOURCES
parameter compulsory, which is used to specify greentea test
file(s). This allows tests to use C, or have a different name.
Therefore also updated all pre-existing greentea test CMake files to
explicity add main.cpp to TEST_SOURCES.
2021-06-29 13:33:42 +01:00
George Psimenos cd5330e5a9 Replace USBTX/RX everywhere else 2021-03-24 10:11:30 +00:00
Rajkumar Kanagaraj 6824b14e48 CMake: rename greentea test macro 2021-02-02 07:43:40 -08:00
Rajkumar Kanagaraj 20fb74f829 Add CMake support 2021-01-05 09:10:05 -08:00
Evelyne Donnaes 30e9050f10 Moved USB greentea tests 2020-11-12 14:57:01 +00:00
jeromecoutant f9832cb3be USB_DEVICE MSD test skipped when RAM is limited 2020-08-27 11:13:21 +02:00
jeromecoutant ccece2fdee Move USB host tests 2020-08-27 11:13:16 +02:00
Lingkai Dong 2f92378642 Move TESTS/usb_device -> drivers/tests/TESTS/usb_device 2020-08-14 17:57:13 +01:00
George Psimenos bb5c2cf32a Duplicate host tests for drivers 2020-07-31 10:04:36 +01:00
George Psimenos 0a759aaa38 Move drivers greentea tests 2020-07-31 10:04:36 +01:00