From b17899878f3efe6802bc6604b922822c7d9ab309 Mon Sep 17 00:00:00 2001 From: Shotaro Yamada Date: Thu, 9 Nov 2017 14:47:14 +0900 Subject: [PATCH] Build path from current_dir --- tests/compile-test.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/compile-test.rs b/tests/compile-test.rs index cda3a586546..bd968cc6009 100644 --- a/tests/compile-test.rs +++ b/tests/compile-test.rs @@ -22,9 +22,11 @@ fn run_mode(dir: &'static str, mode: &'static str) { } config.mode = cfg_mode; - config.build_base = PathBuf::from("target/debug/test_build_base") - .canonicalize() - .unwrap(); + config.build_base = { + let mut path = std::env::current_dir().unwrap(); + path.push("target/debug/test_build_base"); + path + }; config.src_base = PathBuf::from(format!("tests/{}", dir)); config.rustc_path = clippy_driver_path();