Build: Minor refine for build configurations
The patch includes 3 refines:
1. Removes deprecated TFM_LEGACY_API config
2. CORE_TEST_POSITIVE tests can be enabled only in TFM isolation
level 1. The check is currently done in the non_secure_suites.c.
This patch moves the check from source file to CMake file to
align with the other test suites.
3. Removes extra #if check for audit log test suite in source code.
The check has been done in CMake
Change-Id: I1b28f5f5139a0ff762f73334aadd38a931440b29
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/CommonConfig.cmake b/CommonConfig.cmake
index f107e9a..aea576a 100644
--- a/CommonConfig.cmake
+++ b/CommonConfig.cmake
@@ -145,7 +145,6 @@
set (TEST_FRAMEWORK_S OFF)
set (TEST_FRAMEWORK_NS OFF)
set (TFM_PSA_API OFF)
-set (TFM_LEGACY_API ON)
option(TFM_PARTITION_AUDIT_LOG "Enable the TF-M Audit Log partition" ON)
option(TFM_PARTITION_PLATFORM "Enable the TF-M Platform partition" ON)
@@ -207,17 +206,15 @@
endif()
endif()
-if (TFM_LEGACY_API)
- add_definitions(-DTFM_LEGACY_API)
-endif()
-
if (SERVICES_TEST_ENABLED)
set(SERVICE_TEST_S ON)
set(SERVICE_TEST_NS ON)
endif()
if (CORE_TEST)
- set(CORE_TEST_POSITIVE ON)
+ if (NOT CORE_IPC OR TFM_LVL EQUAL 1)
+ set(CORE_TEST_POSITIVE ON)
+ endif()
set(CORE_TEST_INTERACTIVE OFF)
endif()
diff --git a/test/framework/non_secure_suites.c b/test/framework/non_secure_suites.c
index 58e474c..c1af79c 100644
--- a/test/framework/non_secure_suites.c
+++ b/test/framework/non_secure_suites.c
@@ -68,11 +68,9 @@
#endif /* SERVICES_TEST_NS */
#ifdef CORE_TEST_POSITIVE
-#if !defined(TFM_PSA_API) || (TFM_LVL == 1)
/* Non-secure core test cases */
{®ister_testsuite_ns_core_positive, 0, 0, 0},
#endif
-#endif
#ifdef CORE_TEST_INTERACTIVE
/* Non-secure interactive test cases */
diff --git a/test/framework/secure_suites.c b/test/framework/secure_suites.c
index 84cdf00..1e7caa9 100644
--- a/test/framework/secure_suites.c
+++ b/test/framework/secure_suites.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2019, Arm Limited. All rights reserved.
+ * Copyright (c) 2017-2020, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -52,18 +52,11 @@
{®ister_testsuite_s_platform_interface, 0, 0, 0},
#endif
-#ifndef TFM_PSA_API
- /*
- * FixMe: since the following partitions haven't implement the IPC model,
- * they will block the process. Skip them in IPC model.
- */
#ifdef ENABLE_AUDIT_LOGGING_SERVICE_TESTS
/* Secure Audit Logging test cases */
{®ister_testsuite_s_audit_interface, 0, 0, 0},
#endif
-#endif
-
#ifdef ENABLE_IPC_TEST
/* Secure IPC test cases */
{®ister_testsuite_s_ipc_interface, 0, 0, 0},