codecov_helper.py: Filter out platform/ dir from TF-M source code
Based on the request in https://linaro.atlassian.net/browse/TFC-268.
The idea is that this subdir contains platform (i.e. hardware)
specific code (usually imported from external projects), so coverage
of it will depend on a particular platform where code run, so will vary
and doesn't really represent coverage of the TF-M project itself.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: I0648bcc9860ee957a8f013af20aba7a7c68feadf
diff --git a/lava_helper/codecov_helper.py b/lava_helper/codecov_helper.py
index 7d4c452..4ce1173 100644
--- a/lava_helper/codecov_helper.py
+++ b/lava_helper/codecov_helper.py
@@ -56,4 +56,6 @@
dl_artifact("tfm_ns.axf")
run("python3 $SHARE_FOLDER/qa-tools/coverage-tool/coverage-reporting/intermediate_layer.py --config-json $SHARE_FOLDER/tf-m-ci-scripts/lava_helper/trace2covjson.json --local-workspace $SHARE_FOLDER", cwd=job_dir)
run("python3 $SHARE_FOLDER/qa-tools/coverage-tool/coverage-reporting/generate_info_file.py --workspace $SHARE_FOLDER --json covjson.json", cwd=job_dir)
+ run("lcov -rc lcov_branch_coverage=1 -r coverage.info '*/trusted-firmware-m/platform/*' -o coverage.info.tmp", cwd=job_dir)
+ run("mv coverage.info.tmp coverage.info", cwd=job_dir)
run("genhtml --branch-coverage coverage.info --output-directory trace_report | grep -v -E '^Processing file '", cwd=job_dir)