diff options
author | Jeremy Bettis <jbettis@google.com> | 2022-07-19 10:01:00 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-19 20:50:56 +0000 |
commit | db55425c2c783b32ce713e5de54036652a3a3b15 (patch) | |
tree | af03c0b3a7949f69e58b02ba8bf161c47a040e6c | |
parent | dc7d08fc7daaf04b84c31a1652f01e47cc6a9c20 (diff) | |
download | chrome-ec-db55425c2c783b32ce713e5de54036652a3a3b15.tar.gz |
cq: Exclude build dir from coverage
The build dir contains a number of generated files, that creates some
inconsistent results in the coverage reports. Because of this, and also
because those files are generated and don't matter, exclude them from
the coverage report.
BRANCH=None
BUG=b:213374060
TEST=Ran commands in README.md
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: Ie1da42c3cc14faa917d2f0deca6c7acc9a9b7751
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3773934
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
-rwxr-xr-x | zephyr/firmware_builder.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/zephyr/firmware_builder.py b/zephyr/firmware_builder.py index 60a716d170..fb1bbac6c0 100755 --- a/zephyr/firmware_builder.py +++ b/zephyr/firmware_builder.py @@ -234,7 +234,7 @@ def test(opts): cmd = [ "/usr/bin/lcov", "-o", - build_dir / "lcov.info", + build_dir / "lcov_unfiltered.info", "--rc", "lcov_branch_coverage=1", "-a", @@ -242,6 +242,22 @@ def test(opts): "-a", platform_ec / "build/coverage/lcov.info", ] + subprocess.run( + cmd, + cwd=pathlib.Path(__file__).parent, + check=True, + ) + + cmd = [ + "/usr/bin/lcov", + "-o", + build_dir / "lcov.info", + "--rc", + "lcov_branch_coverage=1", + "-r", + build_dir / "lcov_unfiltered.info", + platform_ec / "build/**", + ] output = subprocess.run( cmd, cwd=pathlib.Path(__file__).parent, |