Skip to content

Commit 6776069

Browse files
committed
CMake: greentea: Port PSA Attestation test to CTest
The PSA Attestation test suite requires full RTOS. There is no need to explicitly check PSA support, because when we build all greentea tests from the top of Mbed OS, PSA tests only get included if PSA is enabled.
1 parent d7ef8f8 commit 6776069

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,8 @@ target_link_libraries(mbed-psa
7373

7474
add_subdirectory(test_abstraction_layers)
7575

76+
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
77+
if(BUILD_GREENTEA_TESTS)
78+
add_subdirectory(TESTS)
79+
endif()
80+
endif()
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) 2021 Arm Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
add_subdirectory(attestation/test)
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
# Copyright (c) 2021 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR)
4+
include(mbed_greentea)
55

6-
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../../ CACHE INTERNAL "")
7-
set(TEST_TARGET mbed-platform-psa-attestation)
8-
9-
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake)
10-
11-
project(${TEST_TARGET})
6+
if(MBED_GREENTEA_TEST_BAREMETAL)
7+
set(TEST_SKIPPED "RTOS required")
8+
endif()
129

1310
mbed_greentea_add_test(
1411
TEST_NAME
15-
${TEST_TARGET}
12+
mbed-platform-psa-attestation
1613
TEST_SOURCES
1714
main.cpp
15+
TEST_SKIPPED
16+
${TEST_SKIPPED}
1817
)

0 commit comments

Comments
 (0)