From cea46dd9fe268d733156ed620bee1309fbcc2396 Mon Sep 17 00:00:00 2001 From: Cameron Steffen Date: Wed, 8 Sep 2021 10:41:09 -0500 Subject: [PATCH] Use relative deps path --- tests/compile-test.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/compile-test.rs b/tests/compile-test.rs index c63c47690d5..ddf5b394ae1 100644 --- a/tests/compile-test.rs +++ b/tests/compile-test.rs @@ -120,6 +120,8 @@ fn default_config() -> compiletest::Config { config.run_lib_path = path.clone(); config.compile_lib_path = path; } + let current_exe_path = std::env::current_exe().unwrap(); + let deps_path = current_exe_path.parent().unwrap(); // Using `-L dependency={}` enforces that external dependencies are added with `--extern`. // This is valuable because a) it allows us to monitor what external dependencies are used @@ -127,7 +129,7 @@ fn default_config() -> compiletest::Config { config.target_rustcflags = Some(format!( "--emit=metadata -L dependency={} -L dependency={} -Dwarnings -Zui-testing {}", host_lib().join("deps").display(), - cargo::TARGET_LIB.join("deps").display(), + deps_path.display(), extern_flags(), ));