Build: Enable core tests
Enable positive and IRQ core tests by default, and add variable to
control interactive tests.
Change-Id: I8194234e48ce54ea240ed17a2c21d66d6da2d444
Signed-off-by: Raef Coles <raef.coles@arm.com>
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index 6da45de..9739744 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -74,7 +74,6 @@
tfm_test_framework
PRIVATE
psa_interface
- $<TARGET_PROPERTY:platform_ns,PLATFORM_RTX_LIB_PATH>
psa_api_ns
CMSIS_5_tfm_ns
)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index ea6b32b..3c935d1 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -67,6 +67,7 @@
target_compile_definitions(tfm_ns_tests
INTERFACE
$<$<BOOL:${SYMMETRIC_INITIAL_ATTESTATION}>:SYMMETRIC_INITIAL_ATTESTATION>
+ $<$<BOOL:${TFM_INTERACTIVE_TEST}>:CORE_TEST_INTERACTIVE>
)
####################### Secure #################################################
diff --git a/test/framework/non_secure_suites.c b/test/framework/non_secure_suites.c
index 37655bb..5a2eea7 100644
--- a/test/framework/non_secure_suites.c
+++ b/test/framework/non_secure_suites.c
@@ -81,10 +81,8 @@
{®ister_testsuite_ns_audit_interface, 0, 0, 0},
#endif
-#ifdef CORE_TEST_POSITIVE
- /* Non-secure core test cases */
- {®ister_testsuite_ns_core_positive, 0, 0, 0},
-#endif
+/* Non-secure core test cases */
+{®ister_testsuite_ns_core_positive, 0, 0, 0},
#ifdef CORE_TEST_INTERACTIVE
/* Non-secure interactive test cases */
diff --git a/test/suites/core/CMakeLists.txt b/test/suites/core/CMakeLists.txt
index 002d215..012fee2 100644
--- a/test/suites/core/CMakeLists.txt
+++ b/test/suites/core/CMakeLists.txt
@@ -26,6 +26,8 @@
target_compile_definitions(tfm_test_suite_core_ns
PRIVATE
DOMAIN_NS=1
+ $<$<BOOL:${TFM_PARTITION_PLATFORM}>:TFM_ENABLE_IRQ_TEST>
+ $<$<BOOL:${TFM_INTERACTIVE_TEST}>:CORE_TEST_INTERACTIVE>
)
target_link_libraries(tfm_test_suite_core_ns
@@ -35,6 +37,7 @@
tfm_ns_integration_test
CMSIS_5_tfm_ns
tfm_partition_defs
+ platform_ns
)
diff --git a/test/test_services/CMakeLists.txt b/test/test_services/CMakeLists.txt
index 91e36c6..5d80abf 100644
--- a/test/test_services/CMakeLists.txt
+++ b/test/test_services/CMakeLists.txt
@@ -38,6 +38,9 @@
add_subdirectory(tfm_core_test)
add_subdirectory(tfm_core_test_2)
+if(TFM_PARTITION_PLATFORM)
+ add_subdirectory(tfm_irq_test_service_1)
+endif()
add_subdirectory(tfm_ps_test_service)
add_subdirectory(tfm_secure_client_service)
add_subdirectory(tfm_secure_client_2)
diff --git a/test/test_services/tfm_irq_test_service_1/CMakeLists.txt b/test/test_services/tfm_irq_test_service_1/CMakeLists.txt
new file mode 100644
index 0000000..56e024d
--- /dev/null
+++ b/test/test_services/tfm_irq_test_service_1/CMakeLists.txt
@@ -0,0 +1,49 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2020, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+cmake_policy(SET CMP0079 NEW)
+
+add_library(tfm_partition_irq_test_1 STATIC)
+
+target_sources(tfm_partition_irq_test_1
+ PRIVATE
+ ./tfm_irq_test_service_1.c
+)
+
+target_include_directories(tfm_partition_irq_test_1
+ PUBLIC
+ .
+)
+
+target_link_libraries(tfm_partition_irq_test_1
+ PRIVATE
+ tfm_secure_api
+ psa_interface
+ platform_s
+ tfm_test_framework
+)
+
+target_link_libraries(tfm_spm
+ PRIVATE
+ tfm_partition_irq_test_1
+)
+
+target_include_directories(tfm_test_framework
+ INTERFACE
+ .
+)
+
+############################ Partition Defs ####################################
+
+target_link_libraries(tfm_partitions
+ INTERFACE
+ tfm_partition_irq_test_1
+)
+
+target_compile_definitions(tfm_partition_defs
+ INTERFACE
+ TFM_ENABLE_IRQ_TEST
+)
diff --git a/test/test_services/tfm_irq_test_service_1/tfm_irq_test_service_1.c b/test/test_services/tfm_irq_test_service_1/tfm_irq_test_service_1.c
index 559a3ec..848bca3 100644
--- a/test/test_services/tfm_irq_test_service_1/tfm_irq_test_service_1.c
+++ b/test/test_services/tfm_irq_test_service_1/tfm_irq_test_service_1.c
@@ -10,7 +10,7 @@
#include "tfm_veneers.h"
#include "tfm_secure_api.h"
#include "tfm/tfm_spm_services.h"
-#include "test/test_services/tfm_core_test/core_test_defs.h"
+#include "core_test_defs.h"
#include "psa/service.h"
#include "psa_manifest/pid.h"
#include "psa_manifest/tfm_irq_test_service_1.h"