Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion util/collect_coverage/collect_coverage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,20 @@ fn main() {
.arg("-instr-profile")
.arg(&profdata_file)
.arg("-ignore-filename-regex=.*external/.+")
.arg("-ignore-filename-regex=/tmp/.+")
.arg("-ignore-filename-regex=/tmp/.+");

// Allow additional ignore patterns via RUST_COVERAGE_IGNORE_REGEX env var
// (comma-separated list of regexes passed to llvm-cov -ignore-filename-regex).
if let Ok(extra) = env::var("RUST_COVERAGE_IGNORE_REGEX") {
for pattern in extra.split(',') {
let pattern = pattern.trim();
if !pattern.is_empty() {
llvm_cov_cmd.arg(format!("-ignore-filename-regex={}", pattern));
}
}
}

llvm_cov_cmd
.arg(format!("-path-equivalence=.,{}", execroot.display()))
.arg(test_binary)
.stdout(process::Stdio::piped())
Expand Down
Loading