Skip to content

Commit 983b4af

Browse files
bjzhjingrbradford
authored andcommitted
tests: Update test_coverage.py
Update cargo kcov with features setting, and exclude coverage test for autogenerated files: elf.rs and bootparam.rs Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
1 parent f74075e commit 983b4af

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_coverage.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@ def _get_current_coverage():
2929
exclude_pattern = (
3030
'${CARGO_HOME:-$HOME/.cargo/},'
3131
'usr/lib/,'
32-
'lib/'
32+
'lib/,'
33+
'bootparam.rs,'
34+
'elf.rs'
3335
)
3436
exclude_region = "'mod tests {'"
3537

36-
kcov_cmd = "CARGO_TARGET_DIR={} cargo kcov --all " \
38+
kcov_cmd = "CARGO_TARGET_DIR={} cargo kcov --all --features=elf,bzimage " \
3739
"--output {} -- " \
3840
"--exclude-region={} " \
3941
"--exclude-pattern={} " \

0 commit comments

Comments
 (0)