Hotfix: Fix tests build issues
- Re-enable PSA API FF tests. It requires to split NS app, raw log and
tests builds. PSA API FF tests require to build dedicated secure
partitions. Those secure partition libraries are added in PSA Arch
test CMakeLists. Therefore, PSA Arch test CMakeLists shall be executed
before secure_fw.
- Fix BL2 test build failure when NS app and other tests are disabled
- Rename TFM_NS_LOG_PATH config since raw log in tf-m-tests repo is used
in both NS log and BL2 test log.
Change-Id: I8926679ceb0643cf6a39ba6bbffd2202ff3fc4be
Signed-off-by: David Hu <david.hu@arm.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ef673e0..ce8de53 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -90,11 +90,16 @@
add_subdirectory(lib/ext)
add_subdirectory(lib/fih)
add_subdirectory(tools)
-add_subdirectory(secure_fw)
-if(NS OR TFM_S_REG_TEST OR TFM_NS_REG_TEST OR TEST_BL2)
- add_subdirectory(${TFM_TEST_REPO_PATH} ${CMAKE_CURRENT_BINARY_DIR}/tf-m-tests)
+if(NS)
+ # Set to ${TFM_TEST_REPO_PATH}/app by default
+ add_subdirectory(${TFM_APP_PATH} ${CMAKE_CURRENT_BINARY_DIR}/app)
endif()
+if(NS OR TEST_BL2)
+ add_subdirectory(${TFM_RAW_LOG_PATH} ${CMAKE_CURRENT_BINARY_DIR}/raw_log)
+endif()
+
+add_subdirectory(secure_fw)
add_subdirectory(interface)
if(BL2)
@@ -103,6 +108,10 @@
add_subdirectory(platform)
+if(TFM_S_REG_TEST OR TFM_NS_REG_TEST OR TEST_BL2)
+ add_subdirectory(${TFM_TEST_PATH} ${CMAKE_CURRENT_BINARY_DIR}/tests)
+endif()
+
include(cmake/install.cmake)
if(CRYPTO_HW_ACCELERATOR)