Commit Graph

2 Commits (4767b7e1ac9b03fdd4212fb19fb3b3d31facb33f)

Author SHA1 Message Date
harmut01 c29b561784 CMake: Refactor MBED_TEST_MODE test application 2021-04-28 14:21:33 +01:00
harmut01 fa1d9c059d Cmake: Add backward compatibilty support for MBED_TEST_MODE
Fixes #14494

MBED_TEST_MODE is required for backward compatibilty with CLI1. This
adds a test to ensure that the macro is created when using CLI2 for
testing. This also adds a test in `.travis.yml` that checks whether
CMake defines the macro when BUILD_TESTING is on.

CLI1 Reference: https://os.mbed.com/docs/mbed-os/v6.9/debug-test/greentea-for-testing-applications.html

Also, explicitly create and set the macro BUILD_TESTING to allow for
MBED_TEST_MODE to be defined by CMake. MBED_TEST_MODE is required for
backward compatibilty with CLI1.  BUILD_TESTING is used to determine
whether to define MBED_TEST_MODE.  Normally, this would be automatically
done by CTest (which we intend to add for test automation) but this
hasn't yet been added to our Greentea tests.
2021-04-28 14:21:33 +01:00