Fix: Avoid BL2_COMPILER_CP_FLAG being exported to secure test framework
BL2_COMPILER_CP_FLAG is added to target platform_bl2, and it exports
'-mfloat-abi=soft' with PUBLIC. Thus it is added to secure test
framework. When FPU tests are enabled, the COMPILER_CP_FLAG added to
secure test framework has the value 'hard'. This conflicts with
BL2_COMPILER_CP_FLAG when TEST_BL2 is enabled as well.
Create mcuboot test specific framework target to avoid transmitting
mcuboot compiler options to regression tests.
Signed-off-by: Jianliang Shen <jianliang.shen@arm.com>
Change-Id: I382f7c797e448c06b9c0f93228edb101dd65cea6
diff --git a/tests_reg/test/bl2/mcuboot/CMakeLists.txt b/tests_reg/test/bl2/mcuboot/CMakeLists.txt
index abb1665..17c7ab6 100644
--- a/tests_reg/test/bl2/mcuboot/CMakeLists.txt
+++ b/tests_reg/test/bl2/mcuboot/CMakeLists.txt
@@ -14,6 +14,7 @@
set(LOG_SOURCE_ROOT ${TFM_TESTS_ROOT_DIR}/lib/log)
add_library(mcuboot_test_log INTERFACE)
+add_library(mcuboot_test_framework_common INTERFACE)
target_sources(mcuboot_test_log
INTERFACE
@@ -30,8 +31,9 @@
platform_bl2
)
-target_link_libraries(tfm_test_framework_common
+target_link_libraries(mcuboot_test_framework_common
INTERFACE
+ tfm_test_framework_common
mcuboot_test_log
)
@@ -51,7 +53,7 @@
target_link_libraries(mcuboot_tests
PUBLIC
- tfm_test_framework_common
+ mcuboot_test_framework_common
PRIVATE
platform_bl2
mcuboot_test_suite_integration
diff --git a/tests_reg/test/bl2/mcuboot/suites/integration/CMakeLists.txt b/tests_reg/test/bl2/mcuboot/suites/integration/CMakeLists.txt
index b2c1b29..4a330be 100644
--- a/tests_reg/test/bl2/mcuboot/suites/integration/CMakeLists.txt
+++ b/tests_reg/test/bl2/mcuboot/suites/integration/CMakeLists.txt
@@ -22,7 +22,6 @@
target_link_libraries(mcuboot_test_suite_integration
PUBLIC
- tfm_test_framework_common
+ mcuboot_test_framework_common
bootutil
- platform_bl2
)