Raef Coles | 1971538 | 2020-07-10 09:50:17 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
David Hu | 1a2d483 | 2022-01-18 14:42:04 +0800 | [diff] [blame] | 2 | # Copyright (c) 2020-2022, Arm Limited. All rights reserved. |
Chris Brand | 2e5af6e | 2022-07-05 11:15:17 -0700 | [diff] [blame^] | 3 | # Copyright (c) 2022 Cypress Semiconductor Corporation (an Infineon company) |
| 4 | # or an affiliate of Cypress Semiconductor Corporation. All rights reserved. |
Raef Coles | 1971538 | 2020-07-10 09:50:17 +0100 | [diff] [blame] | 5 | # |
| 6 | # SPDX-License-Identifier: BSD-3-Clause |
| 7 | # |
| 8 | #------------------------------------------------------------------------------- |
| 9 | |
David Hu | 195cb5a | 2022-05-10 22:03:26 +0800 | [diff] [blame] | 10 | # If NS app, secure regression test or non-secure regression test is enabled, |
| 11 | # fetch tf-m-tests repo. |
| 12 | # The conditiions are actually overlapped but it can make the logic more clear. |
| 13 | # Besides, the dependencies between NS app and regression tests will be |
| 14 | # optimized later. |
| 15 | if (NS OR TFM_S_REG_TEST OR TFM_NS_REG_TEST OR TEST_BL2 OR TEST_BL1_1 OR TEST_BL1_2) |
| 16 | # Set tf-m-tests repo config |
| 17 | include(${CMAKE_SOURCE_DIR}/lib/ext/tf-m-tests/repo_config_default.cmake) |
David Hu | 3d2121f | 2021-08-23 18:00:26 +0800 | [diff] [blame] | 18 | |
Chris Brand | 2e5af6e | 2022-07-05 11:15:17 -0700 | [diff] [blame^] | 19 | fetch_remote_library( |
| 20 | LIB_NAME tfm_test_repo |
| 21 | LIB_SOURCE_PATH_VAR TFM_TEST_REPO_PATH |
| 22 | LIB_BASE_DIR "${CMAKE_BINARY_DIR}/lib/ext" |
| 23 | FETCH_CONTENT_ARGS |
| 24 | GIT_REPOSITORY https://git.trustedfirmware.org/TF-M/tf-m-tests.git |
| 25 | GIT_TAG ${TFM_TEST_REPO_VERSION} |
David Hu | 195cb5a | 2022-05-10 22:03:26 +0800 | [diff] [blame] | 26 | GIT_PROGRESS TRUE |
Chris Brand | 2e5af6e | 2022-07-05 11:15:17 -0700 | [diff] [blame^] | 27 | ) |
Raef Coles | 1971538 | 2020-07-10 09:50:17 +0100 | [diff] [blame] | 28 | |
David Hu | 195cb5a | 2022-05-10 22:03:26 +0800 | [diff] [blame] | 29 | if ("${CMSIS_5_PATH}" STREQUAL DOWNLOAD) |
| 30 | set(CMSIS_5_PATH ${TFM_TEST_REPO_PATH}/CMSIS CACHE PATH "Path to CMSIS_5 (or DOWNLOAD to fetch automatically" FORCE) |
| 31 | endif() |
Raef Coles | 1971538 | 2020-07-10 09:50:17 +0100 | [diff] [blame] | 32 | |
David Hu | 195cb5a | 2022-05-10 22:03:26 +0800 | [diff] [blame] | 33 | if (NOT TFM_TEST_PATH) |
| 34 | set(TFM_TEST_PATH ${TFM_TEST_REPO_PATH}/test CACHE PATH "Path to TFM tests" FORCE) |
| 35 | endif() |
| 36 | |
| 37 | # Load TF-M regression test suites setting |
| 38 | if (TFM_NS_REG_TEST OR TFM_S_REG_TEST) |
| 39 | include(${TFM_TEST_PATH}/config/set_config.cmake) |
| 40 | endif() |
Raef Coles | 1971538 | 2020-07-10 09:50:17 +0100 | [diff] [blame] | 41 | endif() |