diff --git a/.github/workflows/greentea_cmake.yml b/.github/workflows/greentea_cmake.yml index 1f1893650e8..42c67eb2deb 100644 --- a/.github/workflows/greentea_cmake.yml +++ b/.github/workflows/greentea_cmake.yml @@ -146,7 +146,7 @@ jobs: # Note: We have to set a wifi network name and password so that the test will compile on devices that use wifi run: | rm -rf __build - cmake -S . -B __build -GNinja -DUPLOAD_METHOD=NONE -DMBED_GREENTEA_WIFI_SECURE_SSID=SomeNetwork -DMBED_GREENTEA_WIFI_SECURE_PASSWORD=SomePassword -DCMAKE_CTEST_ARGUMENTS="--output-on-failure;-V" -DMBED_BUILD_GREENTEA_TESTS=ON -DMBED_GREENTEA_TEST_BAREMETAL=ON -DMBED_GREENTEA_SERIAL_PORT=/dev/ttyDUMMY -DMBED_TARGET=${{ matrix.target }} -DMBED_APP_JSON_PATH=TESTS/configs/greentea_baremetal.json5 + cmake -S . -B __build -GNinja -DUPLOAD_METHOD=NONE -DMBED_GREENTEA_WIFI_SECURE_SSID=SomeNetwork -DMBED_GREENTEA_WIFI_SECURE_PASSWORD=SomePassword -DCMAKE_CTEST_ARGUMENTS="--output-on-failure;-V" -DMBED_BUILD_GREENTEA_TESTS=ON -DMBED_GREENTEA_SERIAL_PORT=/dev/ttyDUMMY -DMBED_TARGET=${{ matrix.target }} -DMBED_APP_JSON_PATH=TESTS/configs/greentea_baremetal.json5 cmake --build __build - name: Build ${{ matrix.target }} with full profile diff --git a/connectivity/netsocket/tests/TESTS/common/CMakeLists.txt b/connectivity/netsocket/tests/TESTS/common/CMakeLists.txt index 94b783bfd60..a2cb8961549 100644 --- a/connectivity/netsocket/tests/TESTS/common/CMakeLists.txt +++ b/connectivity/netsocket/tests/TESTS/common/CMakeLists.txt @@ -22,8 +22,8 @@ if("MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE=WIFI" IN_LIST MBED_CONFIG_DE endif() # Tests can link one of the below two libraries to use lwipstack or nanostack -add_library(mbed-netsocket-tests-use-lwipstack STATIC greentea_network_stack_lwipstack.cpp) +add_library(mbed-netsocket-tests-use-lwipstack STATIC EXCLUDE_FROM_ALL greentea_network_stack_lwipstack.cpp) target_link_libraries(mbed-netsocket-tests-use-lwipstack PUBLIC mbed-lwipstack) -add_library(mbed-netsocket-tests-use-nanostack STATIC greentea_network_stack_nanostack.cpp) +add_library(mbed-netsocket-tests-use-nanostack STATIC EXCLUDE_FROM_ALL greentea_network_stack_nanostack.cpp) target_link_libraries(mbed-netsocket-tests-use-nanostack PUBLIC mbed-nanostack) \ No newline at end of file diff --git a/connectivity/netsocket/tests/TESTS/netsocket/dns/CMakeLists.txt b/connectivity/netsocket/tests/TESTS/netsocket/dns/CMakeLists.txt index aff77b0e6fd..8984afc136b 100644 --- a/connectivity/netsocket/tests/TESTS/netsocket/dns/CMakeLists.txt +++ b/connectivity/netsocket/tests/TESTS/netsocket/dns/CMakeLists.txt @@ -23,7 +23,7 @@ list( asynchronous_dns_cache.cpp ) -if(MBED_GREENTEA_TEST_BAREMETAL) +if(APPLICATION_PROFILE_CONFIG_BAREMETAL) set(TEST_SKIPPED "This test requires an RTOS!") endif() diff --git a/connectivity/netsocket/tests/TESTS/netsocket/tcp/CMakeLists.txt b/connectivity/netsocket/tests/TESTS/netsocket/tcp/CMakeLists.txt index bea6c85ba25..60440f3f3bd 100644 --- a/connectivity/netsocket/tests/TESTS/netsocket/tcp/CMakeLists.txt +++ b/connectivity/netsocket/tests/TESTS/netsocket/tcp/CMakeLists.txt @@ -27,7 +27,7 @@ list( tcpsocket_recv_100k.cpp ) -if(MBED_GREENTEA_TEST_BAREMETAL) +if(APPLICATION_PROFILE_CONFIG_BAREMETAL) set(TEST_SKIPPED "This test requires an RTOS!") endif() diff --git a/connectivity/netsocket/tests/TESTS/netsocket/tls/CMakeLists.txt b/connectivity/netsocket/tests/TESTS/netsocket/tls/CMakeLists.txt index d88a95c99ba..058aaa6372f 100644 --- a/connectivity/netsocket/tests/TESTS/netsocket/tls/CMakeLists.txt +++ b/connectivity/netsocket/tests/TESTS/netsocket/tls/CMakeLists.txt @@ -23,7 +23,7 @@ list( tlssocket_cert_in_filesystem.cpp ) -if(MBED_GREENTEA_TEST_BAREMETAL) +if(APPLICATION_PROFILE_CONFIG_BAREMETAL) set(TEST_SKIPPED "This test requires an RTOS!") endif() diff --git a/connectivity/netsocket/tests/TESTS/netsocket/udp/CMakeLists.txt b/connectivity/netsocket/tests/TESTS/netsocket/udp/CMakeLists.txt index d6f26e81a4c..7cd25a852e6 100644 --- a/connectivity/netsocket/tests/TESTS/netsocket/udp/CMakeLists.txt +++ b/connectivity/netsocket/tests/TESTS/netsocket/udp/CMakeLists.txt @@ -23,7 +23,7 @@ list(APPEND udpsocket_echotest_burst.cpp ) -if(MBED_GREENTEA_TEST_BAREMETAL) +if(APPLICATION_PROFILE_CONFIG_BAREMETAL) set(TEST_SKIPPED "This test requires an RTOS!") endif() diff --git a/connectivity/netsocket/tests/TESTS/network/interface/CMakeLists.txt b/connectivity/netsocket/tests/TESTS/network/interface/CMakeLists.txt index cb282eb36c3..8793b22d428 100644 --- a/connectivity/netsocket/tests/TESTS/network/interface/CMakeLists.txt +++ b/connectivity/netsocket/tests/TESTS/network/interface/CMakeLists.txt @@ -9,7 +9,7 @@ list( networkinterface_status.cpp ) -if(MBED_GREENTEA_TEST_BAREMETAL) +if(APPLICATION_PROFILE_CONFIG_BAREMETAL) set(TEST_SKIPPED "This test requires an RTOS!") endif() diff --git a/drivers/tests/TESTS/mbed_drivers/lp_timeout/CMakeLists.txt b/drivers/tests/TESTS/mbed_drivers/lp_timeout/CMakeLists.txt index 564c42966ba..641f8cd395c 100644 --- a/drivers/tests/TESTS/mbed_drivers/lp_timeout/CMakeLists.txt +++ b/drivers/tests/TESTS/mbed_drivers/lp_timeout/CMakeLists.txt @@ -5,8 +5,8 @@ if(NOT "DEVICE_LPTICKER=1" IN_LIST MBED_TARGET_DEFINITIONS) set(TEST_SKIPPED "Low power ticker not supported for this target") endif() -if(MBED_GREENTEA_TEST_BAREMETAL) - set(TEST_SKIPPED "Low power timer not supported for this target") +if(APPLICATION_PROFILE_CONFIG_BAREMETAL) + set(TEST_SKIPPED "Test not supported on baremetal") endif() mbed_greentea_add_test( diff --git a/drivers/tests/TESTS/mbed_drivers/race_test/CMakeLists.txt b/drivers/tests/TESTS/mbed_drivers/race_test/CMakeLists.txt index ccce698f811..403c6960e41 100644 --- a/drivers/tests/TESTS/mbed_drivers/race_test/CMakeLists.txt +++ b/drivers/tests/TESTS/mbed_drivers/race_test/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) 2020 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -if(${MBED_C_LIB} STREQUAL "small" OR MBED_GREENTEA_TEST_BAREMETAL) +if(${MBED_C_LIB} STREQUAL "small" OR APPLICATION_PROFILE_CONFIG_BAREMETAL) set(TEST_SKIPPED "Mutex test cases require RTOS with multithread to run") endif() diff --git a/drivers/usb/tests/TESTS/usb_device/msd/CMakeLists.txt b/drivers/usb/tests/TESTS/usb_device/msd/CMakeLists.txt index 59a434af5cd..86d4a9e0d93 100644 --- a/drivers/usb/tests/TESTS/usb_device/msd/CMakeLists.txt +++ b/drivers/usb/tests/TESTS/usb_device/msd/CMakeLists.txt @@ -5,7 +5,7 @@ if(NOT "DEVICE_USBDEVICE=1" IN_LIST MBED_TARGET_DEFINITIONS) set(TEST_SKIPPED "USB Device is not supported for this target") endif() -if(MBED_GREENTEA_TEST_BAREMETAL) +if(APPLICATION_PROFILE_CONFIG_BAREMETAL) set(TEST_SKIPPED "USB MSD test is not compatible with mbed-baremetal") endif() diff --git a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/TESTS/attestation/test/CMakeLists.txt b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/TESTS/attestation/test/CMakeLists.txt index 6c3c9487b21..5b589e6bd2a 100644 --- a/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/TESTS/attestation/test/CMakeLists.txt +++ b/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/TESTS/attestation/test/CMakeLists.txt @@ -3,7 +3,7 @@ include(mbed_greentea) -if(MBED_GREENTEA_TEST_BAREMETAL) +if(APPLICATION_PROFILE_CONFIG_BAREMETAL) set(TEST_SKIPPED "RTOS required") endif() diff --git a/platform/tests/TESTS/mbed_platform/atomic/CMakeLists.txt b/platform/tests/TESTS/mbed_platform/atomic/CMakeLists.txt index c24a9dce663..941c3089d8d 100644 --- a/platform/tests/TESTS/mbed_platform/atomic/CMakeLists.txt +++ b/platform/tests/TESTS/mbed_platform/atomic/CMakeLists.txt @@ -3,7 +3,7 @@ include(mbed_greentea) -if(MBED_GREENTEA_TEST_BAREMETAL) +if(APPLICATION_PROFILE_CONFIG_BAREMETAL) set(TEST_SKIPPED "atomic test cases require a RTOS to run.") endif() diff --git a/rtos/tests/TESTS/mbed_rtos/MemoryPool/CMakeLists.txt b/rtos/tests/TESTS/mbed_rtos/MemoryPool/CMakeLists.txt index 3a163d578fd..bf7d757a978 100644 --- a/rtos/tests/TESTS/mbed_rtos/MemoryPool/CMakeLists.txt +++ b/rtos/tests/TESTS/mbed_rtos/MemoryPool/CMakeLists.txt @@ -3,7 +3,7 @@ include(mbed_greentea) -if(MBED_GREENTEA_TEST_BAREMETAL) +if(APPLICATION_PROFILE_CONFIG_BAREMETAL) set(TEST_SKIPPED "MemoryPool test cases require a RTOS to run.") endif() diff --git a/rtos/tests/TESTS/mbed_rtos/basic/CMakeLists.txt b/rtos/tests/TESTS/mbed_rtos/basic/CMakeLists.txt index 394000ece71..27ae5722b81 100644 --- a/rtos/tests/TESTS/mbed_rtos/basic/CMakeLists.txt +++ b/rtos/tests/TESTS/mbed_rtos/basic/CMakeLists.txt @@ -3,7 +3,7 @@ include(mbed_greentea) -if(${MBED_C_LIB} STREQUAL "small" OR MBED_GREENTEA_TEST_BAREMETAL) +if(${MBED_C_LIB} STREQUAL "small" OR APPLICATION_PROFILE_CONFIG_BAREMETAL) set(TEST_SKIPPED "RTOS basic test cases require RTOS with multithread to run") endif() diff --git a/rtos/tests/TESTS/mbed_rtos/condition_variable/CMakeLists.txt b/rtos/tests/TESTS/mbed_rtos/condition_variable/CMakeLists.txt index 4ffb89017a5..e732a2997a6 100644 --- a/rtos/tests/TESTS/mbed_rtos/condition_variable/CMakeLists.txt +++ b/rtos/tests/TESTS/mbed_rtos/condition_variable/CMakeLists.txt @@ -3,7 +3,7 @@ include(mbed_greentea) -if(${MBED_C_LIB} STREQUAL "small" OR MBED_GREENTEA_TEST_BAREMETAL) +if(${MBED_C_LIB} STREQUAL "small" OR APPLICATION_PROFILE_CONFIG_BAREMETAL) set(TEST_SKIPPED "Condition variable test cases require RTOS with multithread to run") endif() diff --git a/rtos/tests/TESTS/mbed_rtos/mail/CMakeLists.txt b/rtos/tests/TESTS/mbed_rtos/mail/CMakeLists.txt index b311e2a06cd..4549790d68e 100644 --- a/rtos/tests/TESTS/mbed_rtos/mail/CMakeLists.txt +++ b/rtos/tests/TESTS/mbed_rtos/mail/CMakeLists.txt @@ -3,7 +3,7 @@ include(mbed_greentea) -if(${MBED_C_LIB} STREQUAL "small" OR MBED_GREENTEA_TEST_BAREMETAL) +if(${MBED_C_LIB} STREQUAL "small" OR APPLICATION_PROFILE_CONFIG_BAREMETAL) set(TEST_SKIPPED "mail test cases require RTOS with multithread to run") endif() diff --git a/rtos/tests/TESTS/mbed_rtos/mutex/CMakeLists.txt b/rtos/tests/TESTS/mbed_rtos/mutex/CMakeLists.txt index 0d123c9a6ea..e433887d674 100644 --- a/rtos/tests/TESTS/mbed_rtos/mutex/CMakeLists.txt +++ b/rtos/tests/TESTS/mbed_rtos/mutex/CMakeLists.txt @@ -3,7 +3,7 @@ include(mbed_greentea) -if(${MBED_C_LIB} STREQUAL "small" OR MBED_GREENTEA_TEST_BAREMETAL) +if(${MBED_C_LIB} STREQUAL "small" OR APPLICATION_PROFILE_CONFIG_BAREMETAL) set(TEST_SKIPPED "Mutex test cases require RTOS with multithread to run") endif() diff --git a/rtos/tests/TESTS/mbed_rtos/queue/CMakeLists.txt b/rtos/tests/TESTS/mbed_rtos/queue/CMakeLists.txt index a66628b0c25..05f7d44b551 100644 --- a/rtos/tests/TESTS/mbed_rtos/queue/CMakeLists.txt +++ b/rtos/tests/TESTS/mbed_rtos/queue/CMakeLists.txt @@ -3,7 +3,7 @@ include(mbed_greentea) -if(${MBED_C_LIB} STREQUAL "small" OR MBED_GREENTEA_TEST_BAREMETAL) +if(${MBED_C_LIB} STREQUAL "small" OR APPLICATION_PROFILE_CONFIG_BAREMETAL) set(TEST_SKIPPED "Queue test cases require RTOS with multithread to run") endif() diff --git a/rtos/tests/TESTS/mbed_rtos/threads/CMakeLists.txt b/rtos/tests/TESTS/mbed_rtos/threads/CMakeLists.txt index d40b9cf12c5..f24ac920e8f 100644 --- a/rtos/tests/TESTS/mbed_rtos/threads/CMakeLists.txt +++ b/rtos/tests/TESTS/mbed_rtos/threads/CMakeLists.txt @@ -3,7 +3,7 @@ include(mbed_greentea) -if(${MBED_C_LIB} STREQUAL "small" OR MBED_GREENTEA_TEST_BAREMETAL) +if(${MBED_C_LIB} STREQUAL "small" OR APPLICATION_PROFILE_CONFIG_BAREMETAL) set(TEST_SKIPPED "RTOS basic test cases require RTOS with multithread to run") endif()