Closed
Description
Sees like #[ignore]
is cached somewhere between compilation. I guess it's somehow related to incremental compilation.
How to reproduce a problem.
Clone a repository: https://github.com/stepancheg/ignore-cached
Inside that repository execute following commands:
# make sure nothing is cached
% cargo clean
% cargo test
...
test foo::foo ... ignored
...
# Test is properly ignored.
# Now comment out #[ignore] on test, so result is
% git diff
diff --git a/src/foo.rs b/src/foo.rs
index 65cd697..244cd2f 100644
--- a/src/foo.rs
+++ b/src/foo.rs
@@ -1,4 +1,4 @@
-#[ignore]
+//#[ignore]
#[test]
fn foo() {
panic!();
# Execute test again
% cargo test
...
test foo::foo ... ignored
...
# Test is still shown as ignored, although #[ignore] is commented out.
# Clean and test again
% cargo clean
% cargo test
...
failures:
foo::foo
...
# So executing clean fixes the issue.
% cargo --version
cargo 1.26.0-nightly (d63299b6e 2018-03-28)
% rustc --version
rustc 1.26.0-nightly (517f24025 2018-03-31)
% uname -a
Darwin nga-mbp 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64