diff --git a/.github/workflows/greentea_cmake.yml b/.github/workflows/greentea_cmake.yml new file mode 100644 index 00000000000..f98921a196c --- /dev/null +++ b/.github/workflows/greentea_cmake.yml @@ -0,0 +1,30 @@ +name: test building greentea tests with cmake + +on: [pull_request] + +jobs: + build-greentea-cmake: + runs-on: ubuntu-latest + container: ghcr.io/armmbed/mbed-os-env:master-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install the latest mbed-tools + run: | + pip3 install --upgrade mbed-tools + mbedtools --version + + - name: Build NUCLEO_G031K8 with baremetal profile + run: | + rm -rf __build + mbedtools configure -t GCC_ARM -m NUCLEO_G031K8 --mbed-os-path . --output-dir __build --app-config TESTS/configs/baremetal.json + cmake -S . -B __build -GNinja -DCMAKE_CTEST_ARGUMENTS="--output-on-failure;-V" -DBUILD_GREENTEA_TESTS=ON -DMBED_GREENTEA_TEST_BAREMETAL=ON + cmake --build __build + + - name: Build ARM_MUSCA_S1 with full profile + run: | + rm -rf __build + mbedtools configure -t GCC_ARM -m ARM_MUSCA_S1 --mbed-os-path . --output-dir __build + cmake -S . -B __build -GNinja -DCMAKE_CTEST_ARGUMENTS="--output-on-failure;-V" -DBUILD_GREENTEA_TESTS=ON + cmake --build __build diff --git a/.github/workflows/test_building_multiple_executables.yml b/.github/workflows/test_building_multiple_executables.yml index 7e3f64595d9..09d3a5abd81 100644 --- a/.github/workflows/test_building_multiple_executables.yml +++ b/.github/workflows/test_building_multiple_executables.yml @@ -5,7 +5,7 @@ on: [pull_request] jobs: multiple-executables-example: runs-on: ubuntu-latest - container: mbedos/mbed-os-env:latest + container: ghcr.io/armmbed/mbed-os-env:master-latest steps: - name: Checkout uses: actions/checkout@v2 diff --git a/CMakeLists.txt b/CMakeLists.txt index e91ccf6388b..18a926ccb57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,17 @@ cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR) +option(BUILD_GREENTEA_TESTS "Build greentea tests only." OFF) + +if(BUILD_GREENTEA_TESTS) + # Usually we rely on the application to set MBED_CONFIG_PATH and include + # app.cmake. They are both required if we're building an application to run + # on an mbed-target. + set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE STRING "") + # TODO: Remove when https://github.com/ARMmbed/mbed-os/issues/14518 is fixed + include(${CMAKE_CURRENT_LIST_DIR}/tools/cmake/app.cmake) +endif() + if(${CMAKE_CROSSCOMPILING}) include(${MBED_CONFIG_PATH}/mbed_config.cmake) include(mbed_set_linker_script) @@ -14,17 +25,19 @@ project(mbed-os) # Add all paths to the list files within Mbed OS list(APPEND CMAKE_MODULE_PATH - "${mbed-os_SOURCE_DIR}/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts;${mbed-os_SOURCE_DIR}/targets/TARGET_Cypress/scripts;${mbed-os_SOURCE_DIR}/targets/TARGET_NXP/scripts" + "${mbed-os_SOURCE_DIR}/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts;${mbed-os_SOURCE_DIR}/targets/TARGET_Cypress/scripts;${mbed-os_SOURCE_DIR}/targets/TARGET_NXP/scripts;${mbed-os_SOURCE_DIR}/targets/TARGET_NUVOTON/scripts/" ) add_subdirectory(extern) -option(BUILD_TESTING "Run unit tests only." OFF) - -if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) +if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) include(CTest) - add_definitions(-DUNITTEST) - add_subdirectory(UNITTESTS) + + if((NOT BUILD_GREENTEA_TESTS) AND BUILD_TESTING) + # Building unit tests only. + add_definitions(-DUNITTEST) + add_subdirectory(UNITTESTS) + endif() endif() add_library(mbed-core INTERFACE) @@ -94,10 +107,12 @@ if(${CMAKE_CROSSCOMPILING}) # Add MBED_TEST_MODE for backward compatibility with Greentea tests written for use with Mbed CLI 1 if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) - target_compile_definitions(${PROJECT_NAME} - INTERFACE - MBED_TEST_MODE - ) + if(NOT BUILD_GREENTEA_TESTS) + target_compile_definitions(${PROJECT_NAME} + INTERFACE + MBED_TEST_MODE + ) + endif() endif() # We need to generate a "response file" to pass to the C preprocessor when we preprocess the linker diff --git a/connectivity/cellular/CMakeLists.txt b/connectivity/cellular/CMakeLists.txt index d7ce11f90d4..1c87aedf697 100644 --- a/connectivity/cellular/CMakeLists.txt +++ b/connectivity/cellular/CMakeLists.txt @@ -2,7 +2,11 @@ # SPDX-License-Identifier: Apache-2.0 if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) - add_subdirectory(tests/UNITTESTS) + if(BUILD_GREENTEA_TESTS) + # add greentea test + else() + add_subdirectory(tests/UNITTESTS) + endif() endif() add_subdirectory(source/framework) diff --git a/connectivity/lorawan/CMakeLists.txt b/connectivity/lorawan/CMakeLists.txt index 941b01e04e5..d30bdacfbce 100644 --- a/connectivity/lorawan/CMakeLists.txt +++ b/connectivity/lorawan/CMakeLists.txt @@ -2,7 +2,11 @@ # SPDX-License-Identifier: Apache-2.0 if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) - add_subdirectory(tests/UNITTESTS) + if(BUILD_GREENTEA_TESTS) + # add greentea test + else() + add_subdirectory(tests/UNITTESTS) + endif() endif() add_subdirectory(lorastack) diff --git a/connectivity/netsocket/CMakeLists.txt b/connectivity/netsocket/CMakeLists.txt index 62bea8cc636..9760c60316d 100644 --- a/connectivity/netsocket/CMakeLists.txt +++ b/connectivity/netsocket/CMakeLists.txt @@ -2,7 +2,11 @@ # SPDX-License-Identifier: Apache-2.0 if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) - add_subdirectory(tests/UNITTESTS) + if(BUILD_GREENTEA_TESTS) + # add greentea test + else() + add_subdirectory(tests/UNITTESTS) + endif() endif() # TODO CMake: Perhaps move this/these file(s) into connectivity/drivers/cellular diff --git a/drivers/CMakeLists.txt b/drivers/CMakeLists.txt index 9079d3d75ac..256ff5b5584 100644 --- a/drivers/CMakeLists.txt +++ b/drivers/CMakeLists.txt @@ -2,7 +2,11 @@ # SPDX-License-Identifier: Apache-2.0 if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) - add_subdirectory(tests/UNITTESTS) + if(BUILD_GREENTEA_TESTS) + add_subdirectory(tests/TESTS) + else() + add_subdirectory(tests/UNITTESTS) + endif() endif() target_include_directories(mbed-core diff --git a/drivers/tests/TESTS/CMakeLists.txt b/drivers/tests/TESTS/CMakeLists.txt new file mode 100644 index 00000000000..ec9280fee98 --- /dev/null +++ b/drivers/tests/TESTS/CMakeLists.txt @@ -0,0 +1,4 @@ +# Copyright (c) 2021 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +add_subdirectory(mbed_drivers/ticker) diff --git a/drivers/tests/TESTS/mbed_drivers/ticker/CMakeLists.txt b/drivers/tests/TESTS/mbed_drivers/ticker/CMakeLists.txt index 6aed7b9a70b..cdc28e4ca19 100644 --- a/drivers/tests/TESTS/mbed_drivers/ticker/CMakeLists.txt +++ b/drivers/tests/TESTS/mbed_drivers/ticker/CMakeLists.txt @@ -1,18 +1,13 @@ # Copyright (c) 2020 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR) - -set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../.. CACHE INTERNAL "") -set(TEST_TARGET mbed-drivers-ticker) - -include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake) - -project(${TEST_TARGET}) +include(mbed_greentea) mbed_greentea_add_test( TEST_NAME - ${TEST_TARGET} + mbed-drivers-ticker TEST_SOURCES main.cpp + HOST_TESTS_DIR + "${CMAKE_CURRENT_LIST_DIR}/../../host_tests" ) diff --git a/events/CMakeLists.txt b/events/CMakeLists.txt index da4d6935112..6e7a6c6bda9 100644 --- a/events/CMakeLists.txt +++ b/events/CMakeLists.txt @@ -2,8 +2,12 @@ # SPDX-License-Identifier: Apache-2.0 if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) - add_subdirectory(tests/UNITTESTS) -else() + if(BUILD_GREENTEA_TESTS) + # add greentea test + else() + add_subdirectory(tests/UNITTESTS) + endif() +endif() add_library(mbed-events INTERFACE) @@ -28,4 +32,3 @@ target_compile_definitions(mbed-events INTERFACE MBED_CONF_EVENTS_PRESENT=1 ) -endif() diff --git a/hal/CMakeLists.txt b/hal/CMakeLists.txt index 87f88bef6f7..3af169e0f16 100644 --- a/hal/CMakeLists.txt +++ b/hal/CMakeLists.txt @@ -2,7 +2,11 @@ # SPDX-License-Identifier: Apache-2.0 if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) - add_subdirectory(tests/UNITTESTS) + if(BUILD_GREENTEA_TESTS) + # add greentea test + else() + add_subdirectory(tests/UNITTESTS) + endif() endif() add_subdirectory(TARGET_FLASH_CMSIS_ALGO EXCLUDE_FROM_ALL) diff --git a/platform/CMakeLists.txt b/platform/CMakeLists.txt index df83719fc69..4be54141b6e 100644 --- a/platform/CMakeLists.txt +++ b/platform/CMakeLists.txt @@ -2,7 +2,11 @@ # SPDX-License-Identifier: Apache-2.0 if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) - add_subdirectory(tests/UNITTESTS) + if(BUILD_GREENTEA_TESTS) + # add greentea test + else() + add_subdirectory(tests/UNITTESTS) + endif() endif() # List of all optional platform libraries available. diff --git a/rtos/CMakeLists.txt b/rtos/CMakeLists.txt index ab9d3082ea9..8af23d87054 100644 --- a/rtos/CMakeLists.txt +++ b/rtos/CMakeLists.txt @@ -2,7 +2,11 @@ # SPDX-License-Identifier: Apache-2.0 if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) - add_subdirectory(tests/UNITTESTS) + if(BUILD_GREENTEA_TESTS) + # add greentea test + else() + add_subdirectory(tests/UNITTESTS) + endif() endif() target_include_directories(mbed-core diff --git a/storage/blockdevice/CMakeLists.txt b/storage/blockdevice/CMakeLists.txt index 9f847d43604..6b03244aebd 100644 --- a/storage/blockdevice/CMakeLists.txt +++ b/storage/blockdevice/CMakeLists.txt @@ -2,7 +2,11 @@ # SPDX-License-Identifier: Apache-2.0 if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) - add_subdirectory(tests/UNITTESTS) + if(BUILD_GREENTEA_TESTS) + # add greentea test + else() + add_subdirectory(tests/UNITTESTS) + endif() endif() if("DATAFLASH" IN_LIST MBED_TARGET_LABELS) diff --git a/storage/filesystem/CMakeLists.txt b/storage/filesystem/CMakeLists.txt index cacd4232086..5d6fca3ec57 100644 --- a/storage/filesystem/CMakeLists.txt +++ b/storage/filesystem/CMakeLists.txt @@ -2,7 +2,11 @@ # SPDX-License-Identifier: Apache-2.0 if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) - add_subdirectory(tests/UNITTESTS) + if(BUILD_GREENTEA_TESTS) + # add greentea test + else() + add_subdirectory(tests/UNITTESTS) + endif() endif() add_subdirectory(fat) diff --git a/storage/kvstore/CMakeLists.txt b/storage/kvstore/CMakeLists.txt index 3f9f137edb4..1d0feeef628 100644 --- a/storage/kvstore/CMakeLists.txt +++ b/storage/kvstore/CMakeLists.txt @@ -2,7 +2,11 @@ # SPDX-License-Identifier: Apache-2.0 if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) - add_subdirectory(tests/UNITTESTS) + if(BUILD_GREENTEA_TESTS) + # add greentea test + else() + add_subdirectory(tests/UNITTESTS) + endif() endif() add_subdirectory(tdbstore) diff --git a/storage/kvstore/filesystemstore/CMakeLists.txt b/storage/kvstore/filesystemstore/CMakeLists.txt index 7289fe8b8df..49b2d344d7f 100644 --- a/storage/kvstore/filesystemstore/CMakeLists.txt +++ b/storage/kvstore/filesystemstore/CMakeLists.txt @@ -2,7 +2,11 @@ # SPDX-License-Identifier: Apache-2.0 if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) - add_subdirectory(tests/UNITTESTS) + if(BUILD_GREENTEA_TESTS) + # add greentea test + else() + add_subdirectory(tests/UNITTESTS) + endif() endif() target_include_directories(mbed-storage-filesystemstore diff --git a/storage/kvstore/tdbstore/CMakeLists.txt b/storage/kvstore/tdbstore/CMakeLists.txt index d4f8d92ed59..82cd283761b 100644 --- a/storage/kvstore/tdbstore/CMakeLists.txt +++ b/storage/kvstore/tdbstore/CMakeLists.txt @@ -2,7 +2,11 @@ # SPDX-License-Identifier: Apache-2.0 if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) - add_subdirectory(tests/UNITTESTS) + if(BUILD_GREENTEA_TESTS) + # add greentea test + else() + add_subdirectory(tests/UNITTESTS) + endif() endif() target_include_directories(mbed-storage-tdbstore diff --git a/targets/TARGET_NUVOTON/TARGET_M2354/TARGET_TFM/TARGET_NU_M2354/COMPONENT_TFM_S_FW/CMakeLists.txt b/targets/TARGET_NUVOTON/TARGET_M2354/TARGET_TFM/TARGET_NU_M2354/COMPONENT_TFM_S_FW/CMakeLists.txt index 03127cc5a5d..01ead3cced7 100644 --- a/targets/TARGET_NUVOTON/TARGET_M2354/TARGET_TFM/TARGET_NU_M2354/COMPONENT_TFM_S_FW/CMakeLists.txt +++ b/targets/TARGET_NUVOTON/TARGET_M2354/TARGET_TFM/TARGET_NU_M2354/COMPONENT_TFM_S_FW/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (c) 2020-2021 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -include(${MBED_PATH}/targets/TARGET_NUVOTON/scripts/mbed_set_post_build_nuvoton.cmake) +include(mbed_set_post_build_nuvoton) target_link_libraries(mbed-m2354-tfm INTERFACE diff --git a/targets/TARGET_NUVOTON/scripts/mbed_set_post_build_nuvoton.cmake b/targets/TARGET_NUVOTON/scripts/mbed_set_post_build_nuvoton.cmake index 9f7a3cb9c9c..d0340a53b03 100644 --- a/targets/TARGET_NUVOTON/scripts/mbed_set_post_build_nuvoton.cmake +++ b/targets/TARGET_NUVOTON/scripts/mbed_set_post_build_nuvoton.cmake @@ -1,7 +1,7 @@ # Copyright (c) 2021 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -include(${MBED_PATH}/tools/cmake/mbed_set_post_build.cmake) +include(mbed_set_post_build) # # Sign TF-M secure and non-secure images and combine them with the bootloader diff --git a/targets/targets.json b/targets/targets.json index 55d9c35a592..a54bdc64da0 100644 --- a/targets/targets.json +++ b/targets/targets.json @@ -993,6 +993,10 @@ "GCC_ARM", "IAR" ], + "supported_application_profiles": [ + "full", + "bare-metal" + ], "macros": [ "CPU_MK64FN1M0VMD12", "FSL_RTOS_MBED", @@ -4417,6 +4421,10 @@ "GCC_ARM", "IAR" ], + "supported_application_profiles": [ + "full", + "bare-metal" + ], "extra_labels": [ "NXP", "MCUXpresso_MCUS", diff --git a/tools/cmake/README.md b/tools/cmake/README.md index 50ef9531d35..7ae8223dc59 100644 --- a/tools/cmake/README.md +++ b/tools/cmake/README.md @@ -97,7 +97,7 @@ Install prerequisites suggested in the previous section and follow the below ste ``` Or build the test binary with the baremetal profile ``` - cd cmake_build//// && cmake ../../../.. -G Ninja -DMBED_TEST_BAREMETAL=ON && cmake --build . + cd cmake_build//// && cmake ../../../.. -G Ninja -DMBED_GREENTEA_TEST_BAREMETAL=ON && cmake --build . ``` Notes: diff --git a/tools/cmake/mbed_greentea.cmake b/tools/cmake/mbed_greentea.cmake index ffe73ed0f11..1541447db4f 100644 --- a/tools/cmake/mbed_greentea.cmake +++ b/tools/cmake/mbed_greentea.cmake @@ -1,12 +1,17 @@ # Copyright (c) 2020-2021 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -option(MBED_TEST_BAREMETAL OFF) +option(MBED_GREENTEA_TEST_BAREMETAL "Select baremetal greentea tests" OFF) -set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "") +set(MBED_HTRUN_ARGUMENTS "" CACHE STRING "Argument list to forward to htrun.") -include(${CMAKE_CURRENT_LIST_DIR}/app.cmake) -set(MBED_ROOT ${CMAKE_CURRENT_LIST_DIR}/../.. CACHE INTERNAL "") +# TODO: After we convert all greentea tests to use CTest, remove this code. We +# define these parameters in mbed-os/CMakeLists.txt for greentea tests. +if(NOT BUILD_GREENTEA_TESTS) + set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "") + include(${CMAKE_CURRENT_LIST_DIR}/app.cmake) + set(MBED_ROOT ${CMAKE_CURRENT_LIST_DIR}/../.. CACHE INTERNAL "") +endif() # CMake Macro for generalizing CMake configuration across the greentea test suite with configurable parameters # Macro args: @@ -14,6 +19,7 @@ set(MBED_ROOT ${CMAKE_CURRENT_LIST_DIR}/../.. CACHE INTERNAL "") # TEST_INCLUDE_DIRS - Test suite include directories for the test # TEST_SOURCES - Test suite sources # TEST_REQUIRED_LIBS - Test suite required libraries +# HOST_TESTS_DIR - Path to the "host_tests" directory # # calling the macro: # mbed_greentea_add_test( @@ -21,6 +27,7 @@ set(MBED_ROOT ${CMAKE_CURRENT_LIST_DIR}/../.. CACHE INTERNAL "") # TEST_INCLUDE_DIRS mbed_store # TEST_SOURCES foo.cpp bar.cpp # TEST_REQUIRED_LIBS mbed-kvstore mbed-xyz +# HOST_TESTS_DIR ${CMAKE_CURRENT_LIST_DIR}/host_tests # ) macro(mbed_greentea_add_test) @@ -30,6 +37,7 @@ macro(mbed_greentea_add_test) TEST_INCLUDE_DIRS TEST_SOURCES TEST_REQUIRED_LIBS + HOST_TESTS_DIR ) cmake_parse_arguments(MBED_GREENTEA "${options}" @@ -37,12 +45,15 @@ macro(mbed_greentea_add_test) "${multipleValueArgs}" ${ARGN} ) - add_subdirectory(${MBED_ROOT} build) - add_executable(${MBED_GREENTEA_TEST_NAME}) + # TODO: After we convert all greentea tests to use CTest, remove this + # add_subdirectory call. We will attach the tests to the mbed-os project, + # rather than creating a new project for each test that depends on mbed-os. + if(NOT BUILD_GREENTEA_TESTS) + add_subdirectory(${MBED_ROOT} build) + endif() - # Explicitly enable BUILD_TESTING until CTest is added to the Greentea client - set(BUILD_TESTING ON) + add_executable(${MBED_GREENTEA_TEST_NAME}) target_include_directories(${MBED_GREENTEA_TEST_NAME} PRIVATE @@ -55,7 +66,7 @@ macro(mbed_greentea_add_test) ${MBED_GREENTEA_TEST_SOURCES} ) - if(MBED_TEST_BAREMETAL) + if(MBED_GREENTEA_TEST_BAREMETAL) list(APPEND MBED_GREENTEA_TEST_REQUIRED_LIBS mbed-baremetal) else() list(APPEND MBED_GREENTEA_TEST_REQUIRED_LIBS mbed-os) @@ -70,6 +81,39 @@ macro(mbed_greentea_add_test) mbed_set_post_build(${MBED_GREENTEA_TEST_NAME}) + if(NOT ${MBED_OUTPUT_EXT} STREQUAL "") + set(MBED_GREENTEA_TEST_IMAGE_NAME "${MBED_GREENTEA_TEST_NAME}.${MBED_OUTPUT_EXT}") + else() + set(MBED_GREENTEA_TEST_IMAGE_NAME "${MBED_GREENTEA_TEST_NAME}.bin") + endif() + + if(DEFINED MBED_GREENTEA_HOST_TESTS_DIR) + list(APPEND MBED_HTRUN_ARGUMENTS "-e;${MBED_GREENTEA_HOST_TESTS_DIR}") + endif() + + if(DEFINED MBED_TARGET) + list(APPEND MBED_HTRUN_ARGUMENTS "-m;${MBED_TARGET}") + endif() + + if(NOT "${MBED_GREENTEA_TEST_RESET_TIMEOUT}" STREQUAL "") + list(APPEND MBED_HTRUN_ARGUMENTS "-R;${MBED_GREENTEA_TEST_RESET_TIMEOUT}") + endif() + + list(APPEND CONFIG_DEFS_COPY ${MBED_CONFIG_DEFINITIONS}) + list(FILTER CONFIG_DEFS_COPY INCLUDE REGEX "MBED_CONF_PLATFORM_STDIO_BAUD_RATE") + if(NOT ${CONFIG_DEFS_COPY} STREQUAL "") + string(REGEX MATCH "[0-9]*$" BAUD_RATE ${CONFIG_DEFS_COPY}) + list(APPEND MBED_HTRUN_ARGUMENTS "--baud-rate=${BAUD_RATE}") + endif() + + add_test( + NAME ${MBED_GREENTEA_TEST_NAME} + COMMAND mbedhtrun + -f ${MBED_GREENTEA_TEST_IMAGE_NAME} + ${MBED_HTRUN_ARGUMENTS} + COMMAND_EXPAND_LISTS + ) + option(VERBOSE_BUILD "Have a verbose build process") if(VERBOSE_BUILD) set(CMAKE_VERBOSE_MAKEFILE ON)