-
Notifications
You must be signed in to change notification settings - Fork 3k
Cmake: Add MBED_TEST_MODE macro #14538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@harmut01, thank you for your changes. |
Adding a test as well here? |
Yes, I'm working on making a test project now 👍🏿 |
177fea2
to
a25fcdc
Compare
I need to add a step to install mbed-tools in
|
ee1b8b1
to
d69b2ef
Compare
@Patater looks like the "Extended" hiding of cmake isn't sufficient, i'll try and move it into the cmake job. |
Fixes ARMmbed#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.
d148cf2
to
c29b561
Compare
@harmut01 Are you able to fix Travis failures ? |
yes @0xc0170, I'll take a look at it today. |
The default distribution of CMake that comes with focal is 3.16.3. Add kitware's repository (https://apt.kitware.com/) to the source list so the latest copy of CMake is installed during CI.
CI started |
Jenkins CI Test : ❌ FAILEDBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
CI restarted |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Summary of changes
Fixes #14494
MBED_TEST_MODE was used in CLI1 to prevent multiple applications from
being built. Add the macro to provide backward compatibility, along with a test
application.
Impact of changes
None
Migration actions required
None
Documentation
CLI1 Reference: https://os.mbed.com/docs/mbed-os/v6.9/debug-test/greentea-for-testing-applications.html
Pull request type
Test results
Reviewers