Skip to content

Commit e9cac4c

Browse files
committed
Ignore unused_mod.rs file in code coverage results
As discussed in rust-lang#92142 (comment), tests that contain multiple files order their results differently on Windows and Linux which the test runner currently can't handle correctly. For now, ignore the "bin" part of the test and only include the unused library dependency which is what the test really cares about anyway.
1 parent ebc0d0d commit e9cac4c

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

src/test/run-make-fulldeps/coverage-reports/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ endif
6464
# if and when we allow `llvm-cov` to produce results for multiple files. Note, the path separators
6565
# appear to be normalized to `/` in those files, thankfully.)
6666
LLVM_COV_IGNORE_FILES=\
67-
--ignore-filename-regex='(uses_crate.rs|uses_inline_crate.rs)'
67+
--ignore-filename-regex='(uses_crate.rs|uses_inline_crate.rs|unused_mod.rs)'
6868

6969
all: $(patsubst $(SOURCEDIR)/lib/%.rs,%,$(wildcard $(SOURCEDIR)/lib/*.rs)) $(patsubst $(SOURCEDIR)/%.rs,%,$(wildcard $(SOURCEDIR)/*.rs))
7070

Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
../coverage/lib/unused_mod_helper.rs:
21
1| 0|pub fn never_called_function() {
32
2| 0| println!("I am never called");
43
3| 0|}
54

6-
../coverage/unused_mod.rs:
7-
1| |#[path = "lib/unused_mod_helper.rs"]
8-
2| |mod unused_module;
9-
3| |
10-
4| 1|fn main() {
11-
5| 1| println!("hello world!");
12-
6| 1|}
13-

0 commit comments

Comments
 (0)