Skip to content

Commit c35976f

Browse files
committed
Respect target.application-profile setting for Greentea build
MBED_GREENTEA_TEST_BAREMETAL can become deprecated and be removed. Respect target.application-profile setting instead to resolve link library.
1 parent d06791c commit c35976f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

TESTS/configs/greentea_baremetal.json5

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"target_overrides": {
33
"*": {
4-
"target.c_lib": "small"
4+
"target.c_lib": "small",
5+
"target.application-profile": "bare-metal"
56
}
67
},
78
"overrides": {

tools/cmake/mbed_greentea.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ function(mbed_greentea_add_test)
9292
${MBED_GREENTEA_TEST_SOURCES}
9393
)
9494

95-
if(MBED_GREENTEA_TEST_BAREMETAL)
95+
# Resolve link library based on target.application-profile setting
96+
get_target_property(MBED_CORE_FLAGS_TARGET_LINK_LIBRARIES mbed-core-flags INTERFACE_LINK_LIBRARIES)
97+
if(NOT "mbed-rtos-flags" IN_LIST MBED_CORE_FLAGS_TARGET_LINK_LIBRARIES)
9698
list(APPEND MBED_GREENTEA_TEST_REQUIRED_LIBS mbed-baremetal)
9799
else()
98100
list(APPEND MBED_GREENTEA_TEST_REQUIRED_LIBS mbed-os)

0 commit comments

Comments
 (0)