mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 17:18:32 +03:00
Ignore unused_mod.rs file in code coverage results
As discussed in https://github.com/rust-lang/rust/pull/92142#issuecomment-1008239473, 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.
This commit is contained in:
@@ -64,7 +64,7 @@ endif
|
||||
# if and when we allow `llvm-cov` to produce results for multiple files. Note, the path separators
|
||||
# appear to be normalized to `/` in those files, thankfully.)
|
||||
LLVM_COV_IGNORE_FILES=\
|
||||
--ignore-filename-regex='(uses_crate.rs|uses_inline_crate.rs)'
|
||||
--ignore-filename-regex='(uses_crate.rs|uses_inline_crate.rs|unused_mod.rs)'
|
||||
|
||||
all: $(patsubst $(SOURCEDIR)/lib/%.rs,%,$(wildcard $(SOURCEDIR)/lib/*.rs)) $(patsubst $(SOURCEDIR)/%.rs,%,$(wildcard $(SOURCEDIR)/*.rs))
|
||||
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
../coverage/lib/unused_mod_helper.rs:
|
||||
1| 0|pub fn never_called_function() {
|
||||
2| 0| println!("I am never called");
|
||||
3| 0|}
|
||||
|
||||
../coverage/unused_mod.rs:
|
||||
1| |#[path = "lib/unused_mod_helper.rs"]
|
||||
2| |mod unused_module;
|
||||
3| |
|
||||
4| 1|fn main() {
|
||||
5| 1| println!("hello world!");
|
||||
6| 1|}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user