Skip to content

Commit 5d31b71

Browse files
committed
CMake: greentea: Add skip reason to rtos test
1 parent 174e016 commit 5d31b71

File tree

12 files changed

+99
-0
lines changed

12 files changed

+99
-0
lines changed

rtos/tests/TESTS/mbed_rtos/MemoryPool/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 "MemoryPool test cases require a RTOS to run.")
8+
endif()
9+
610
mbed_greentea_add_test(
711
TEST_NAME
812
mbed-rtos-memorypool
913
TEST_SOURCES
1014
main.cpp
15+
TEST_SKIPPED
16+
${TEST_SKIPPED}
1117
)

rtos/tests/TESTS/mbed_rtos/basic/CMakeLists.txt

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

44
include(mbed_greentea)
55

6+
if(DEFINED MBED_RTOS_SINGLE_THREAD OR MBED_GREENTEA_TEST_BAREMETAL)
7+
set(TEST_SKIPPED "RTOS basic test cases require RTOS with multithread to run")
8+
endif()
9+
10+
if(NOT "DEVICE_USTICKER=1" IN_LIST MBED_TARGET_DEFINITIONS)
11+
set(TEST_SKIPPED "UsTicker need to be enabled for this test.")
12+
endif()
13+
614
mbed_greentea_add_test(
715
TEST_NAME
816
mbed-rtos-basic
917
TEST_SOURCES
1018
main.cpp
1119
HOST_TESTS_DIR
1220
"${CMAKE_CURRENT_LIST_DIR}/../../host_tests"
21+
TEST_SKIPPED
22+
${TEST_SKIPPED}
1323
)

rtos/tests/TESTS/mbed_rtos/condition_variable/CMakeLists.txt

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

44
include(mbed_greentea)
55

6+
if(DEFINED MBED_RTOS_SINGLE_THREAD OR MBED_GREENTEA_TEST_BAREMETAL)
7+
set(TEST_SKIPPED "Condition variable test cases require RTOS with multithread to run")
8+
endif()
9+
10+
if(NOT "DEVICE_USTICKER=1" IN_LIST MBED_TARGET_DEFINITIONS)
11+
set(TEST_SKIPPED "UsTicker need to be enabled for this test.")
12+
endif()
13+
614
mbed_greentea_add_test(
715
TEST_NAME
816
mbed-rtos-condition-variable
917
TEST_SOURCES
1018
main.cpp
19+
TEST_SKIPPED
20+
${TEST_SKIPPED}
1121
)

rtos/tests/TESTS/mbed_rtos/event_flags/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 "DEVICE_USTICKER=1" IN_LIST MBED_TARGET_DEFINITIONS)
7+
set(TEST_SKIPPED "UsTicker need to be enabled for this test.")
8+
endif()
9+
610
mbed_greentea_add_test(
711
TEST_NAME
812
mbed-rtos-event-flags
913
TEST_SOURCES
1014
main.cpp
15+
TEST_SKIPPED
16+
${TEST_SKIPPED}
1117
)

rtos/tests/TESTS/mbed_rtos/heap_and_stack/CMakeLists.txt

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

44
include(mbed_greentea)
55

6+
if(DEFINED TARGET_CORTEX_A)
7+
set(TEST_SKIPPED "test not supported for cortex-A.")
8+
elseif(NOT "DEVICE_USTICKER=1" IN_LIST MBED_TARGET_DEFINITIONS)
9+
set(TEST_SKIPPED "UsTicker need to be enabled for this test.")
10+
endif()
11+
12+
613
mbed_greentea_add_test(
714
TEST_NAME
815
mbed-rtos-heap-and-stack
916
TEST_SOURCES
1017
main.cpp
18+
TEST_SKIPPED
19+
${TEST_SKIPPED}
1120
)

rtos/tests/TESTS/mbed_rtos/mail/CMakeLists.txt

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

44
include(mbed_greentea)
55

6+
if(DEFINED MBED_RTOS_SINGLE_THREAD OR MBED_GREENTEA_TEST_BAREMETAL)
7+
set(TEST_SKIPPED "mail test cases require RTOS with multithread to run")
8+
endif()
9+
10+
if(NOT "DEVICE_USTICKER=1" IN_LIST MBED_TARGET_DEFINITIONS)
11+
set(TEST_SKIPPED "UsTicker need to be enabled for this test.")
12+
endif()
13+
614
mbed_greentea_add_test(
715
TEST_NAME
816
mbed-rtos-mail
917
TEST_SOURCES
1018
main.cpp
19+
TEST_SKIPPED
20+
${TEST_SKIPPED}
1121
)

rtos/tests/TESTS/mbed_rtos/malloc/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 "DEVICE_USTICKER=1" IN_LIST MBED_TARGET_DEFINITIONS)
7+
set(TEST_SKIPPED "UsTicker need to be enabled for this test.")
8+
endif()
9+
610
mbed_greentea_add_test(
711
TEST_NAME
812
mbed-rtos-malloc
913
TEST_SOURCES
1014
main.cpp
15+
TEST_SKIPPED
16+
${TEST_SKIPPED}
1117
)

rtos/tests/TESTS/mbed_rtos/mutex/CMakeLists.txt

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

44
include(mbed_greentea)
55

6+
if(DEFINED MBED_RTOS_SINGLE_THREAD OR MBED_GREENTEA_TEST_BAREMETAL)
7+
set(TEST_SKIPPED "Mutex test cases require RTOS with multithread to run")
8+
endif()
9+
10+
if(NOT "DEVICE_USTICKER=1" IN_LIST MBED_TARGET_DEFINITIONS)
11+
set(TEST_SKIPPED "UsTicker need to be enabled for this test.")
12+
endif()
13+
614
mbed_greentea_add_test(
715
TEST_NAME
816
mbed-rtos-mutex
917
TEST_SOURCES
1018
main.cpp
19+
TEST_SKIPPED
20+
${TEST_SKIPPED}
1121
)

rtos/tests/TESTS/mbed_rtos/queue/CMakeLists.txt

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

44
include(mbed_greentea)
55

6+
if(DEFINED MBED_RTOS_SINGLE_THREAD OR MBED_GREENTEA_TEST_BAREMETAL)
7+
set(TEST_SKIPPED "Queue test cases require RTOS with multithread to run")
8+
endif()
9+
10+
if(NOT "DEVICE_USTICKER=1" IN_LIST MBED_TARGET_DEFINITIONS)
11+
set(TEST_SKIPPED "UsTicker need to be enabled for this test.")
12+
endif()
13+
614
mbed_greentea_add_test(
715
TEST_NAME
816
mbed-rtos-queue
917
TEST_SOURCES
1018
main.cpp
19+
TEST_SKIPPED
20+
${TEST_SKIPPED}
1121
)

rtos/tests/TESTS/mbed_rtos/semaphore/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 "DEVICE_USTICKER=1" IN_LIST MBED_TARGET_DEFINITIONS)
7+
set(TEST_SKIPPED "UsTicker need to be enabled for this test.")
8+
endif()
9+
610
mbed_greentea_add_test(
711
TEST_NAME
812
mbed-rtos-semaphore
913
TEST_SOURCES
1014
main.cpp
15+
TEST_SKIPPED
16+
${TEST_SKIPPED}
1117
)

0 commit comments

Comments
 (0)