From a8bf5012392af719f8d478fbefd355eaf5a27d05 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sun, 19 May 2019 13:25:06 -0700 Subject: [PATCH] Fix compile-test from forcing a rebuild. --- tests/compile-test.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/compile-test.rs b/tests/compile-test.rs index 663e55d8ea2b..e0b1ebf4b8b8 100644 --- a/tests/compile-test.rs +++ b/tests/compile-test.rs @@ -52,7 +52,7 @@ fn config(mode: &str, dir: PathBuf) -> compiletest::Config { // as we'll get a duplicate matching versions. Instead, disambiguate with // `--extern dep=path`. // See https://github.com/rust-lang/rust-clippy/issues/4015. - let needs_disambiguation = ["serde"]; + let needs_disambiguation = ["serde", "regex", "clippy_lints"]; // This assumes that deps are compiled (they are for Cargo integration tests). let deps = std::fs::read_dir(host_libs().join("deps")).unwrap(); let disambiguated = deps @@ -62,7 +62,7 @@ fn config(mode: &str, dir: PathBuf) -> compiletest::Config { // NOTE: This only handles a single dep // https://github.com/laumann/compiletest-rs/issues/101 needs_disambiguation.iter().find_map(|dep| { - if name.starts_with(&format!("lib{}-", dep)) { + if name.starts_with(&format!("lib{}-", dep)) && name.ends_with(".rlib") { Some(format!("--extern {}={}", dep, path.display())) } else { None @@ -95,8 +95,6 @@ fn config(mode: &str, dir: PathBuf) -> compiletest::Config { fn run_mode(mode: &str, dir: PathBuf) { let cfg = config(mode, dir); - // clean rmeta data, otherwise "cargo check; cargo test" fails (#2896) - cfg.clean_rmeta(); compiletest::run_tests(&cfg); }