Skip to content

Commit a42a7a8

Browse files
committed
CMake: greentea: Add skip reason to platform test
1 parent 0548424 commit a42a7a8

File tree

7 files changed

+43
-0
lines changed

7 files changed

+43
-0
lines changed

platform/tests/TESTS/mbed_platform/atomic/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33

44
include(mbed_greentea)
55

6+
if(MBED_GREENTEA_TEST_BAREMETAL)
7+
set(TEST_SKIPPED "atomic test cases require a RTOS to run.")
8+
endif()
9+
610
mbed_greentea_add_test(
711
TEST_NAME
812
mbed-platform-atomic
913
TEST_SOURCES
1014
main.cpp
15+
TEST_SKIPPED
16+
${TEST_SKIPPED}
1117
)

platform/tests/TESTS/mbed_platform/crash_reporting/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@
33

44
include(mbed_greentea)
55

6+
if(NOT DEFINED MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED)
7+
set(TEST_SKIPPED "crash_reporting test not supported.")
8+
endif()
9+
610
mbed_greentea_add_test(
711
TEST_NAME
812
mbed-platform-crash-reporting
913
TEST_SOURCES
1014
main.cpp
1115
HOST_TESTS_DIR
1216
"${CMAKE_CURRENT_LIST_DIR}/../../host_tests"
17+
TEST_SKIPPED
18+
${TEST_SKIPPED}
1319
)

platform/tests/TESTS/mbed_platform/stats_cpu/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@
33

44
include(mbed_greentea)
55

6+
if(NOT DEFINED MBED_CPU_STATS_ENABLED OR NOT "DEVICE_LPTICKER=1" IN_LIST MBED_TARGET_DEFINITIONS
7+
OR NOT "DEVICE_SLEEP=1" IN_LIST MBED_TARGET_DEFINITIONS)
8+
set(TEST_SKIPPED "Stats cpu test not supported.")
9+
endif()
10+
611
mbed_greentea_add_test(
712
TEST_NAME
813
mbed-platform-stats-cpu
914
TEST_SOURCES
1015
main.cpp
16+
TEST_SKIPPED
17+
${TEST_SKIPPED}
1118
)

platform/tests/TESTS/mbed_platform/stats_heap/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33

44
include(mbed_greentea)
55

6+
if(NOT DEFINED MBED_HEAP_STATS_ENABLED)
7+
set(TEST_SKIPPED "Stats heap test not supported.")
8+
endif()
9+
610
mbed_greentea_add_test(
711
TEST_NAME
812
mbed-platform-stats-heap
913
TEST_SOURCES
1014
main.cpp
15+
TEST_SKIPPED
16+
${TEST_SKIPPED}
1117
)

platform/tests/TESTS/mbed_platform/stats_sys/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33

44
include(mbed_greentea)
55

6+
if(NOT DEFINED MBED_SYS_STATS_ENABLED)
7+
set(TEST_SKIPPED "System stats test not supported.")
8+
endif()
9+
610
mbed_greentea_add_test(
711
TEST_NAME
812
mbed-platform-stats-sys
913
TEST_SOURCES
1014
main.cpp
15+
TEST_SKIPPED
16+
${TEST_SKIPPED}
1117
)

platform/tests/TESTS/mbed_platform/stats_thread/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33

44
include(mbed_greentea)
55

6+
if(NOT DEFINED MBED_THREAD_STATS_ENABLED)
7+
set(TEST_SKIPPED "Thread stats test not supported.")
8+
endif()
9+
610
mbed_greentea_add_test(
711
TEST_NAME
812
mbed-platform-stats-thread
913
TEST_SOURCES
1014
main.cpp
15+
TEST_SKIPPED
16+
${TEST_SKIPPED}
1117
)

platform/tests/TESTS/mbed_platform/wait_ns/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@
33

44
include(mbed_greentea)
55

6+
if(DEFINED TARGET_ARM_FM)
7+
set(TEST_SKIPPED "Wait ns test not supported.")
8+
endif()
9+
610
mbed_greentea_add_test(
711
TEST_NAME
812
mbed-platform-wait-ns
913
TEST_SOURCES
1014
main.cpp
1115
HOST_TESTS_DIR
1216
"${CMAKE_CURRENT_LIST_DIR}/../../host_tests"
17+
TEST_SKIPPED
18+
${TEST_SKIPPED}
1319
)

0 commit comments

Comments
 (0)