Skip to content

Commit 529fc80

Browse files
committed
Use standalone greentea-client
For CMake or Mbed CLI 2, use the standalone greentea-client.
1 parent bcb491f commit 529fc80

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

features/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
# List of all features libraries available.
55
add_library(mbed-fpga-ci-test-shield INTERFACE)
66
add_library(mbed-client-cli INTERFACE)
7-
add_library(mbed-greentea INTERFACE)
7+
add_library(mbed-unity INTERFACE)
8+
add_library(mbed-utest INTERFACE)
89

910
add_subdirectory(frameworks/COMPONENT_FPGA_CI_TEST_SHIELD)
1011
add_subdirectory(frameworks/mbed-client-cli)
11-
add_subdirectory(frameworks/greentea-client)
1212
add_subdirectory(frameworks/unity)
1313
add_subdirectory(frameworks/utest)

features/frameworks/greentea-client/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
# greentea-client
1111

12+
*Note*: This copy of greentea-client is used only with Mbed CLI 1. Mbed CLI 2
13+
will use the standalone greentea-client, automatically fetched by CMake [in the
14+
`extern/` directory](../../../extern/README.md).
15+
1216
`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.
1317

1418
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.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
target_include_directories(mbed-greentea
4+
target_include_directories(mbed-unity
55
INTERFACE
66
.
77
unity
88
)
99

10-
target_sources(mbed-greentea
10+
target_sources(mbed-unity
1111
INTERFACE
1212
source/unity.c
1313
)

features/frameworks/utest/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
target_include_directories(mbed-greentea
4+
target_include_directories(mbed-utest
55
INTERFACE
66
.
77
utest
88
)
99

10-
target_sources(mbed-greentea
10+
target_sources(mbed-utest
1111
INTERFACE
1212
mbed-utest-shim.cpp
1313
source/unity_handler.cpp

tools/cmake/mbed_greentea.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ macro(mbed_greentea_add_test)
6666
# -D "MBED_TEST_LINK_LIBRARIES=mbed-baremetal ext-errorlogging"
6767
if (DEFINED MBED_TEST_LINK_LIBRARIES)
6868
separate_arguments(MBED_TEST_LINK_LIBRARIES)
69-
list(APPEND MBED_GREENTEA_TEST_REQUIRED_LIBS ${MBED_TEST_LINK_LIBRARIES} mbed-greentea)
69+
list(APPEND MBED_GREENTEA_TEST_REQUIRED_LIBS ${MBED_TEST_LINK_LIBRARIES} greentea-client mbed-unity mbed-utest)
7070
else()
71-
list(APPEND MBED_GREENTEA_TEST_REQUIRED_LIBS mbed-greentea)
71+
list(APPEND MBED_GREENTEA_TEST_REQUIRED_LIBS greentea-client mbed-unity mbed-utest)
7272
endif()
7373

7474
target_link_libraries(${TEST_NAME}

0 commit comments

Comments
 (0)