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.
ls
1 parent 2a12566 commit 40154ee2b1e256c3e39c92ab950a15a44bb3724d
@Robert Walton Robert Walton authored on 7 Jul 2021
Showing 4 changed files
View
drivers/CMakeLists.txt
View
drivers/tests/TESTS/CMakeLists.txt 0 → 100644
View
drivers/tests/TESTS/mbed_drivers/ticker/CMakeLists.txt
View
tools/cmake/mbed_greentea.cmake