fix(coverity): add additional trap information
Errors in the coverity scripts are handled silently, to ensure that we
get results for all configurations. This makes it hard, in certain
instances, to know where a build failure has occured and why. Add
additional information to the trap handler to make it easier to resolve
hard to debug errors.
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
Change-Id: I762f04c2058be18a60f94ec77a921b6a5770a2ac
diff --git a/script/tf-coverity/tf-cov-make b/script/tf-coverity/tf-cov-make
index f2fcebd..ac6e945 100755
--- a/script/tf-coverity/tf-cov-make
+++ b/script/tf-coverity/tf-cov-make
@@ -15,7 +15,12 @@
#
set -E
-trap 'rc=$?; error_count=$((error_count+1));' ERR INT
+error() {
+ rc=$?;
+ error_count=$((error_count+1));
+ echo "ERROR: signal $rc at ${1} ${2} (error_count = $error_count)"
+}
+trap 'error "${BASH_SOURCE}" "${LINENO}"' ERR INT
TF_SOURCES=$1
if [ ! -d "$TF_SOURCES" ]; then
@@ -798,7 +803,7 @@
make PLAT=npcm845x $(common_flags) all SPD=opteed
if [[ "$rc" -gt 0 ]]; then
- echo "ERROR: tc-cov-make failed with $error_count failures"
+ echo "ERROR: tf-cov-make failed with $error_count failures"
exit $rc
fi