Skip to content

Commit 0615c28

Browse files
LDong-Armhazzlim
authored andcommitted
CMake: greentea: Port PSA Attestation test to CTest
The PSA Attestation test suite requires full RTOS and PSA support.
1 parent 297bdea commit 0615c28

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-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: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
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+
elseif(NOT ("PSA" IN_LIST MBED_TARGET_LABELS AND "EXPERIMENTAL_API" IN_LIST MBED_TARGET_LABELS))
9+
set(TEST_SKIPPED "Experiemental API and PSA required")
10+
endif()
1211

1312
mbed_greentea_add_test(
1413
TEST_NAME
15-
${TEST_TARGET}
14+
mbed-platform-psa-attestation
1615
TEST_SOURCES
1716
main.cpp
17+
TEST_SKIPPED
18+
${TEST_SKIPPED}
1819
)

0 commit comments

Comments
 (0)