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.
pull/14902/head
Lingkai Dong 2021-07-09 11:05:51 +01:00
parent d7ef8f857f
commit 6776069a18
3 changed files with 16 additions and 8 deletions

View File

@ -73,3 +73,8 @@ target_link_libraries(mbed-psa
add_subdirectory(test_abstraction_layers)
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
if(BUILD_GREENTEA_TESTS)
add_subdirectory(TESTS)
endif()
endif()

View File

@ -0,0 +1,4 @@
# Copyright (c) 2021 Arm Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
add_subdirectory(attestation/test)

View File

@ -1,18 +1,17 @@
# Copyright (c) 2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR)
include(mbed_greentea)
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../../ CACHE INTERNAL "")
set(TEST_TARGET mbed-platform-psa-attestation)
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake)
project(${TEST_TARGET})
if(MBED_GREENTEA_TEST_BAREMETAL)
set(TEST_SKIPPED "RTOS required")
endif()
mbed_greentea_add_test(
TEST_NAME
${TEST_TARGET}
mbed-platform-psa-attestation
TEST_SOURCES
main.cpp
TEST_SKIPPED
${TEST_SKIPPED}
)