Use the workspace target directory

This commit is contained in:
Oliver Schneider 2017-05-17 14:45:36 +02:00
parent 4465bc3e3f
commit fdbc62dd4f
2 changed files with 4 additions and 4 deletions

View File

@ -7,14 +7,14 @@ fn run_mode(dir: &'static str, mode: &'static str) {
let mut config = compiletest::default_config();
let cfg_mode = mode.parse().expect("Invalid mode");
config.target_rustcflags = Some("-L target/debug/ -L target/debug/deps".to_owned());
config.target_rustcflags = Some("-L clippy_tests/target/debug/ -L clippy_tests/target/debug/deps".to_owned());
if let Ok(name) = var::<&str>("TESTNAME") {
let s: String = name.to_owned();
config.filter = Some(s)
}
config.mode = cfg_mode;
config.build_base = PathBuf::from("target/debug/test_build_base");
config.build_base = PathBuf::from("clippy_tests/target/debug/test_build_base");
config.src_base = PathBuf::from(format!("tests/{}", dir));
compiletest::run_tests(&config);

View File

@ -22,8 +22,8 @@ fn dogfood() {
let cfg_mode = "run-fail".parse().expect("Invalid mode");
let mut s = String::new();
s.push_str(" -L target/debug/");
s.push_str(" -L target/debug/deps");
s.push_str(" -L clippy_tests/target/debug/");
s.push_str(" -L clippy_tests/target/debug/deps");
s.push_str(" -Zextra-plugins=clippy -Ltarget_recur/debug -Dwarnings -Dclippy_pedantic -Dclippy -Dclippy_internal");
config.target_rustcflags = Some(s);
if let Ok(name) = var("TESTNAME") {