Tests: The "split build" adaptation
This code builds TEST_NS_ITS test using split build.
cd ./trusted-firmware-m
cmake -S . -B ../tf-m-tests/build-tfm -DTFM_PLATFORM=arm/mps2/an521
-DCONFIG_TFM_BUILD_SPLIT=ON
-DCMAKE_INSTALL_PREFIX=../tf-m-tests/build-tfm/api_ns
-DTFM_TOOLCHAINE=toolchain_GNUARM.cmake
-DTFM_PROFILE=profile_small
-DNS=OFF -DTEST_S=OFF -DPLATFORM_DEFAULT_IMAGE_SIGNING=ON
cmake --build build -- install
cd ../tf-m-tests/app_ns_test
cmake -S . -B build -DTEST_NS_ITS=OFF
-DCONFIG_SPE_PATH=../build-tfm/api_ns
cmake --build build -- tfm_app_binaries
Check the binary in ./build/tfm_s_ns_signed.bin
Signed-off-by: Anton Komlev <anton.komlev@arm.com>
Change-Id: Icaf38d844fe38d444b973776af2616d16c5439b1
diff --git a/app_ns_test/test_app.c b/app_ns_test/test_app.c
new file mode 100644
index 0000000..bd45b38
--- /dev/null
+++ b/app_ns_test/test_app.c
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017-2022, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ */
+
+#include "test_app.h"
+#include "tfm_log.h"
+#include "test_framework_integ_test.h"
+
+/**
+ * \brief Services test thread
+ *
+ */
+__attribute__((noreturn))
+void test_app(void *argument)
+{
+ UNUSED_VARIABLE(argument);
+
+ tfm_non_secure_client_run_tests();
+
+ /* Output EOT char for test environments like FVP. */
+ LOG_MSG("\x04");
+
+ /* End of test */
+ for (;;) {
+ }
+}