Skip to content

Commit 83fe145

Browse files
cov: disable cfg(coverage) for llvm-cov runs
Pass --no-cfg-coverage to cargo llvm-cov in xtask coverage commands to avoid dependency breakage on crates using cfg_attr(coverage, no_coverage).
1 parent 2cb39d1 commit 83fe145

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

xtask/src/cov.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ pub fn report(sh: &Shell, html_report: bool) -> anyhow::Result<()> {
5353

5454
if html_report {
5555
cmd!(sh, "{CARGO} llvm-cov --html")
56+
.arg("--no-cfg-coverage")
5657
.arg("--ignore-filename-regex")
5758
.arg(COV_IGNORE_REGEX)
5859
.run()?;
@@ -283,6 +284,7 @@ impl CoverageReport {
283284
let output = cmd!(
284285
sh,
285286
"{CARGO} llvm-cov
287+
--no-cfg-coverage
286288
--ignore-filename-regex {COV_IGNORE_REGEX}
287289
--json"
288290
)

0 commit comments

Comments
 (0)