Skip to content

Commit a658bfc

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 95fe5af commit a658bfc

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

TESTS/configs/greentea_baremetal.json5

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
"platform.all-stats-enabled": 1,
1010

1111
// Enable auto reboot on error, required for crash reporting test
12-
"platform.fatal-error-auto-reboot-enabled": true
12+
"platform.fatal-error-auto-reboot-enabled": true,
13+
14+
// Enable bare-metal application profile
15+
"target.application-profile": "bare-metal"
1316
}
1417
}

tools/cmake/mbed_greentea.cmake

+3-1
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)