diff --git a/features/CMakeLists.txt b/features/CMakeLists.txt index f02bf73ebfd0..8109c7149916 100644 --- a/features/CMakeLists.txt +++ b/features/CMakeLists.txt @@ -4,10 +4,10 @@ # List of all features libraries available. add_library(mbed-fpga-ci-test-shield INTERFACE) add_library(mbed-client-cli INTERFACE) -add_library(mbed-greentea INTERFACE) +add_library(mbed-unity INTERFACE) +add_library(mbed-utest INTERFACE) add_subdirectory(frameworks/COMPONENT_FPGA_CI_TEST_SHIELD) add_subdirectory(frameworks/mbed-client-cli) -add_subdirectory(frameworks/greentea-client) add_subdirectory(frameworks/unity) add_subdirectory(frameworks/utest) diff --git a/features/frameworks/greentea-client/README.md b/features/frameworks/greentea-client/README.md index e77b21a7bfac..d67e41ac38ff 100644 --- a/features/frameworks/greentea-client/README.md +++ b/features/frameworks/greentea-client/README.md @@ -9,6 +9,10 @@ # greentea-client +*Note*: This copy of greentea-client is used only with Mbed CLI 1. Mbed CLI 2 +will use the standalone greentea-client, automatically fetched by CMake [in the +`extern/` directory](../../../extern/README.md). + `greentea-client` is a client library for [the Greentea test tool](https://github.com/ARMmbed/mbed-os-tools/tree/master/packages/mbed-greentea) when used in an [Mbed OS](https://os.mbed.com/) project. This package implements the client side of the key-value protocol used for communication between the device under test (DUT) and the host. The `Greentea` tool implements the protocol's host behavior. We use [utest](https://github.com/ARMmbed/mbed-os/blob/master/features/frameworks/utest/README.md) as our test harness. diff --git a/features/frameworks/unity/CMakeLists.txt b/features/frameworks/unity/CMakeLists.txt index 3bc86c72695a..96974259d2ef 100644 --- a/features/frameworks/unity/CMakeLists.txt +++ b/features/frameworks/unity/CMakeLists.txt @@ -1,13 +1,13 @@ # Copyright (c) 2020 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -target_include_directories(mbed-greentea +target_include_directories(mbed-unity INTERFACE . unity ) -target_sources(mbed-greentea +target_sources(mbed-unity INTERFACE source/unity.c ) diff --git a/features/frameworks/utest/CMakeLists.txt b/features/frameworks/utest/CMakeLists.txt index a17a2dadfd10..6af46a763dd8 100644 --- a/features/frameworks/utest/CMakeLists.txt +++ b/features/frameworks/utest/CMakeLists.txt @@ -1,13 +1,13 @@ # Copyright (c) 2020 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -target_include_directories(mbed-greentea +target_include_directories(mbed-utest INTERFACE . utest ) -target_sources(mbed-greentea +target_sources(mbed-utest INTERFACE mbed-utest-shim.cpp source/unity_handler.cpp diff --git a/tools/cmake/mbed_greentea.cmake b/tools/cmake/mbed_greentea.cmake index 23fddc6603ff..58fa9c611635 100644 --- a/tools/cmake/mbed_greentea.cmake +++ b/tools/cmake/mbed_greentea.cmake @@ -66,9 +66,9 @@ macro(mbed_greentea_add_test) # -D "MBED_TEST_LINK_LIBRARIES=mbed-baremetal ext-errorlogging" if (DEFINED MBED_TEST_LINK_LIBRARIES) separate_arguments(MBED_TEST_LINK_LIBRARIES) - list(APPEND MBED_GREENTEA_TEST_REQUIRED_LIBS ${MBED_TEST_LINK_LIBRARIES} mbed-greentea) + list(APPEND MBED_GREENTEA_TEST_REQUIRED_LIBS ${MBED_TEST_LINK_LIBRARIES} greentea-client mbed-unity mbed-utest) else() - list(APPEND MBED_GREENTEA_TEST_REQUIRED_LIBS mbed-greentea) + list(APPEND MBED_GREENTEA_TEST_REQUIRED_LIBS greentea-client mbed-unity mbed-utest) endif() target_link_libraries(${TEST_NAME}