Skip to content

Commit 4e2206e

Browse files
committed
Use standalone greentea-client
For CMake or Mbed CLI 2, use the standalone greentea-client.
1 parent 20f6b52 commit 4e2206e

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ macro(mbed_greentea_add_test)
6161
list(APPEND MBED_GREENTEA_TEST_REQUIRED_LIBS mbed-os)
6262
endif()
6363

64-
list(APPEND MBED_GREENTEA_TEST_REQUIRED_LIBS mbed-greentea)
64+
list(APPEND MBED_GREENTEA_TEST_REQUIRED_LIBS greentea-client mbed-unity mbed-utest)
6565

6666
target_link_libraries(${MBED_GREENTEA_TEST_NAME}
6767
PRIVATE

0 commit comments

Comments
 (0)