tf-coverity: add TC2 build with tf-m test-suite
Added TC2 build with tf-m test-suite to include the compilation of
delegated_attestation.c file. This compilation was recently removed
for the FVP platform as part of this change [1]
[1]: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/23140
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I2b577fd1f0d3c43dd71cae3be4df56ed82926185
diff --git a/script/tf-coverity/common-def.sh b/script/tf-coverity/common-def.sh
index be92c50..e42c91f 100644
--- a/script/tf-coverity/common-def.sh
+++ b/script/tf-coverity/common-def.sh
@@ -81,6 +81,13 @@
# cryptography support (e.g. for Trusted Board Boot feature).
MBED_TLS_SOURCES_TAG="mbedtls-3.4.1"
+# TF-M variables
+TF_M_TESTS_DIR=tf-m-tests
+TF_M_TESTS_URL_REPO=https://git.trustedfirmware.org/TF-M/tf-m-tests.git
+
+TF_M_EXTRAS_DIR=tf-m-extras
+TF_M_EXTRAS_URL_REPO=https://git.trustedfirmware.org/TF-M/tf-m-extras.git
+
ARMCLANG_PATH="$(set_armclang_toolchain)"
CRYPTOCELL_LIB_PATH=/arm/projectscratch/ssg/trusted-fw/dummy-crypto-lib
diff --git a/script/tf-coverity/tf-cov-make b/script/tf-coverity/tf-cov-make
index c51d544..50c830e 100755
--- a/script/tf-coverity/tf-cov-make
+++ b/script/tf-coverity/tf-cov-make
@@ -34,6 +34,21 @@
git clone -q --depth 1 -b "$MBED_TLS_SOURCES_TAG" "$MBED_TLS_URL_REPO" "$MBED_TLS_DIR"
fi
+# Get TF-M tests and extras repo for TC build with tf-m test suite.
+if [ ! -d "$TF_M_TESTS_DIR" ]; then
+ git clone "$TF_M_TESTS_URL_REPO" "$TF_M_TESTS_DIR"
+ cd "$TF_M_TESTS_DIR"
+ git checkout master
+fi
+
+cd "$TF_SOURCES"
+
+if [ ! -d "$TF_M_EXTRAS_DIR" ]; then
+ git clone "$TF_M_EXTRAS_URL_REPO" "$TF_M_EXTRAS_DIR"
+ cd "$TF_M_EXTRAS_DIR"
+ git checkout master
+fi
+
cd "$TF_SOURCES"
# Clean TF source dir to make sure we don't analyse temporary files.
@@ -328,6 +343,8 @@
clean_build $(common_flags) PLAT=tc TARGET_PLATFORM=2 ${ARM_TBB_OPTIONS} MEASURED_BOOT=1
clean_build $(common_flags) PLAT=tc TARGET_PLATFORM=2 ${ARM_TBB_OPTIONS} PLATFORM_TEST=rss-rotpk
clean_build $(common_flags) PLAT=tc TARGET_PLATFORM=2 ${ARM_TBB_OPTIONS} PLATFORM_TEST=rss-nv-counters
+clean_build $(common_flags) PLAT=tc TARGET_PLATFORM=2 ${ARM_TBB_OPTIONS} PLATFORM_TEST=tfm-testsuite \
+ MEASURED_BOOT=1 TF_M_TESTS_PATH=$(pwd)/tf-m-tests TF_M_EXTRAS_PATH=$(pwd)/tf-m-extras
#
# Morello platform