Build: Add regression test suites out-of-tree build support
This commit support vendors to run platform-specific extra tests with
TF-M regression tests. Tf-m-tests provide a flexible interface to
integrate platform-specific tests. The platform-specific extra tests
can be included via out-of-tree build with tf-m-tests. The
out-of-tree build of extra tests can enable developers to perform
tests quickly and flexibly during development.
Signed-off-by: Jianliang Shen <jianliang.shen@arm.com>
Change-Id: I9bf834036221122812e29b24a1fddcbc3bad9821
diff --git a/lib/ext/tf-m-tests/tf-m-tests.cmake b/lib/ext/tf-m-tests/tf-m-tests.cmake
index 1220cce..c34b079 100644
--- a/lib/ext/tf-m-tests/tf-m-tests.cmake
+++ b/lib/ext/tf-m-tests/tf-m-tests.cmake
@@ -33,6 +33,17 @@
endif()
endforeach()
+# By default EXTRA_<NS/S>_TEST_SUITES_PATHS is not set, extra test is also an
+# out-of-tree build regression test, and if they are enabled,
+# TFM_<NS/S>_REG_TEST will be enabled.
+if (EXTRA_NS_TEST_SUITES_PATHS)
+ set(TFM_NS_REG_TEST ON)
+endif()
+
+if (EXTRA_S_TEST_SUITES_PATHS)
+ set(TFM_S_REG_TEST ON)
+endif()
+
# If NS app, secure regression test or non-secure regression test is enabled,
# fetch tf-m-tests repo.
# The conditiions are actually overlapped but it can make the logic more clear.