summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2022-05-06 10:30:49 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-05-06 17:42:04 +0000
commitb1c040903abcbc4a95058d982d07000a968f52b8 (patch)
tree8cea3bed7b8522c6ec67b41bfafa31266c0865f6
parent5f00bcf5d3569e3abbce630df4a3bc537d63dd39 (diff)
downloadchrome-ec-b1c040903abcbc4a95058d982d07000a968f52b8.tar.gz
gitlab: Use the same filter in coverage_template
We were filtering out some directories that are impossible to test with coverage right now from the tests, but not from the boards. Change filters to match in all 3 places. BRANCH=None BUG=None TEST=None Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I17ff82e277069ecddb7c61b61e9ba089a3c54cc9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3632182 Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Yuval Peress <peress@google.com> Commit-Queue: Yuval Peress <peress@google.com> Tested-by: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r--.gitlab-ci.yml26
1 files changed, 21 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dd5b635475..fb251a1475 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -92,6 +92,8 @@ seed_cache:
# Builds the project with coverage enabled, removes the non-ec files.
# Then merges with the tests, excludes all files not used by this project,
# and generates a report.
+# NOTE: If you change the lcov -r command below, also edit the one in
+# merged_coverage
.coverage_template: &coverage_template
stage: test
needs: ["merged_coverage", "zephyr_coverage", "twister_coverage"]
@@ -114,12 +116,24 @@ seed_cache:
-a "${BUILD_DIR}/${PROJECT}/output/zephyr.info" -a build/merged.info
- lcov --rc lcov_branch_coverage=1 -o "${BUILD_DIR}/${PROJECT}/output/no_zephyr.info"
-r "${BUILD_DIR}/${PROJECT}/output/zephyr.info" "${ZEPHYR_BASE}/**"
- "${MODULES_DIR}/*" "${EC_DIR}/zephyr/drivers/*" '/usr/include/x86_64-linux-gnu/*'
- "${EC_DIR}/build/*/build-*/zephyr/*/generated/**"
+ "${ZEPHYR_BASE}/**" "${MODULES_DIR}/**"
+ "${EC_DIR}/zephyr/drivers/**" "${EC_DIR}/zephyr/include/drivers/**"
+ "${EC_DIR}/zephyr/shim/chip/**" "${EC_DIR}/zephyr/shim/core/**"
+ "${EC_DIR}/zephyr/projects/**" "/usr/include/x86_64-linux-gnu/**"
+ "${EC_DIR}/build/*/build-*/zephyr/*/generated/**" "${EC_DIR}/test/**"
+ "${EC_DIR}/zephyr/shim/chip/npcx/npcx_monitor/**"
+ "${EC_DIR}/zephyr/emul/**" "${EC_DIR}/zephyr/test/**"
+ "**/testsuite/**" "**/subsys/emul/**"
- lcov --rc lcov_branch_coverage=1 -o "${BUILD_DIR}/${PROJECT}/output/merged_no_zephyr.info"
- -r "${BUILD_DIR}/${PROJECT}/output/merged.info" "${ZEPHYR_BASE}/**"
- "${MODULES_DIR}/*" "${EC_DIR}/zephyr/drivers/*" '/usr/include/x86_64-linux-gnu/*'
- "${EC_DIR}/build/*/build-*/zephyr/*/generated/**"
+ -r "${BUILD_DIR}/${PROJECT}/output/merged.info"
+ "${ZEPHYR_BASE}/**" "${MODULES_DIR}/**"
+ "${EC_DIR}/zephyr/drivers/**" "${EC_DIR}/zephyr/include/drivers/**"
+ "${EC_DIR}/zephyr/shim/chip/**" "${EC_DIR}/zephyr/shim/core/**"
+ "${EC_DIR}/zephyr/projects/**" "/usr/include/x86_64-linux-gnu/**"
+ "${EC_DIR}/build/*/build-*/zephyr/*/generated/**" "${EC_DIR}/test/**"
+ "${EC_DIR}/zephyr/shim/chip/npcx/npcx_monitor/**"
+ "${EC_DIR}/zephyr/emul/**" "${EC_DIR}/zephyr/test/**"
+ "**/testsuite/**" "**/subsys/emul/**"
- grep "SF:" "${BUILD_DIR}/${PROJECT}/output/no_zephyr.info" | sort -u |
sed -e 's|^SF:||' | xargs lcov --rc lcov_branch_coverage=1
-o "${BUILD_DIR}/${PROJECT}/output/filtered_no_zephyr.info"
@@ -231,6 +245,8 @@ zephyr_coverage:
expire_in: 1 week
coverage: '/lines\.*: \d+\.\d+%/'
+# NOTE: If you change the lcov -r command below, also edit the one in
+# .coverage_template
merged_coverage:
stage: test
needs: ["ec_coverage", "zephyr_coverage"]