code-coverage: add repos to increase coverage
- At merge if repos are missing can generate error§
- At individual job, increase coverage including other repos
Signed-off-by: Saul Romero <saul.romero@arm.com>
Change-Id: I12cf96f1a5e7422c35975b7cae1d4e1b606cef8a
diff --git a/tf-a-builder/builders.sh b/tf-a-builder/builders.sh
index ff5713f..3e740d9 100755
--- a/tf-a-builder/builders.sh
+++ b/tf-a-builder/builders.sh
@@ -158,7 +158,13 @@
export RUN_CONFIG="$run_config"
export TEST_CONFIG="$test_config"
export TEST_GROUP="$test_group"
-export COVERAGE_ON=$(echo "$RUN_CONFIG" | grep -qE 'bmcov' && echo 1 || echo 0)
+# Conditions for code coverage is that the run config has 'bmcov' is its name
+# or the test group parameter has 'code-coverage' contained in its name.
+export COVERAGE_ON=$((echo "$RUN_CONFIG" | grep -v 'aarch32' |
+ grep -qE 'bmcov' && echo 1) ||
+ (echo "${TEST_GROUP}" | grep -v 'aarch32' |
+ grep -qE 'code-coverage' && echo 1) ||
+ echo 0)
# Run this script bash -x, and it gets passed downstream for debugging
if echo "$-" | grep -q "x"; then
diff --git a/tf-a-builder/feedback-trace-splitter.sh b/tf-a-builder/feedback-trace-splitter.sh
index 1658e28..0e797e1 100755
--- a/tf-a-builder/feedback-trace-splitter.sh
+++ b/tf-a-builder/feedback-trace-splitter.sh
@@ -63,7 +63,21 @@
"COMMIT": "",
"REFSPEC": "${TF_GERRIT_REFSPEC}",
"LOCATION": "trusted-firmware-a"
- }
+ },
+ {
+ "type": "git",
+ "URL": "https://review.trustedfirmware.org/hafnium/hafnium",
+ "COMMIT": "",
+ "REFSPEC": "${SPM_REFSPEC}",
+ "LOCATION": "workspace/spm"
+ },
+ {
+ "type": "http",
+ "URL": "$MBEDTLS_URL",
+ "COMPRESSION": "xz",
+ "EXTRA_PARAMS": "--strip-components=1",
+ "LOCATION": "workspace/mbedtls"
+ }
],
"workspace": "${PROJECT_ROOT}",
"output_file": "${OUTPUT_JSON}"
diff --git a/tf-a-builder/lava-log-process.sh b/tf-a-builder/lava-log-process.sh
index 3b96069..f445802 100755
--- a/tf-a-builder/lava-log-process.sh
+++ b/tf-a-builder/lava-log-process.sh
@@ -7,9 +7,10 @@
# Split the UART messages to the corresponding log files
${WORKSPACE}/tf-a-job-configs/tf-a-builder/log-splitter.py "${WORKSPACE}/lava-raw.log"
+ PROJECT_WORKSPACE=${WORKSPACE}
# Take possible code coverage trace data from the LAVA log
${WORKSPACE}/tf-a-job-configs/tf-a-builder/feedback-trace-splitter.sh \
- ${WORKSPACE}/trusted-firmware-a \
+ ${PROJECT_WORKSPACE} \
${WORKSPACE} \
${WORKSPACE}/artefacts-lava/ \
${TF_GERRIT_REFSPEC}
@@ -22,7 +23,7 @@
cd ${WORKSPACE}/qa-tools/coverage-tool/coverage-reporting
./branch_coverage.sh \
--config ${WORKSPACE}/config_file.json \
- --workspace ${WORKSPACE}/trusted-firmware-a \
+ --workspace ${PROJECT_WORKSPACE} \
--outdir ${WORKSPACE}/trace_report
find ${WORKSPACE}/trace_report
fi