fix(static-checks.sh): regulate newly-added files detection check
This patch will ensure 'newly-added files detection' static check will
only run on the 'trusted-firmware' repository.
It will thereby resolve the 'tf-tftf-main' job from its failure as
'tf-a-tests' repository is not examined for coverity.
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Change-Id: Ib5fa56629ec830dcab5cff9d7f6b948f5a403736
diff --git a/script/static-checks/static-checks.sh b/script/static-checks/static-checks.sh
index 92689e0..b50dc1e 100755
--- a/script/static-checks/static-checks.sh
+++ b/script/static-checks/static-checks.sh
@@ -111,16 +111,19 @@
# Check to ensure newly added source files are detected for Coverity Scan analysis
-echo 'Checking whether the newly added source files are detected for Coverity Scan analysis...'
-echo
-"$CI_ROOT"/script/static-checks/static-checks-detect-newly-added-files.sh
-if [ "$?" != 0 ]; then
- echo "Files Detection check: FAILURE"
- ((ERROR_COUNT++))
-else
- echo "Files Detection check: PASS"
+# Check to be executed only on trusted-firmware repository.
+if [ "$REPO_UNDER_TEST" = "trusted-firmware" ]; then
+ echo 'Checking whether the newly added source files are detected for Coverity Scan analysis...'
+ echo
+ "$CI_ROOT"/script/static-checks/static-checks-detect-newly-added-files.sh
+ if [ "$?" != 0 ]; then
+ echo "Files Detection check: FAILURE"
+ ((ERROR_COUNT++))
+ else
+ echo "Files Detection check: PASS"
+ fi
+ echo
fi
-echo
# Check error count