mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
Fix the compile-test tests when setting Cargo's build.build-dir setting to a path that's distinct from target-dir.
This commit is contained in:
@@ -197,10 +197,6 @@ fn base_config(&self, test_dir: &str, mandatory_annotations: bool) -> Config {
|
||||
defaults.set_custom("diagnostic-collector", collector);
|
||||
}
|
||||
config.with_args(&self.args);
|
||||
let current_exe_path = env::current_exe().unwrap();
|
||||
let deps_path = current_exe_path.parent().unwrap();
|
||||
let profile_path = deps_path.parent().unwrap();
|
||||
|
||||
config.program.args.extend(
|
||||
[
|
||||
"--emit=metadata",
|
||||
@@ -224,6 +220,7 @@ fn base_config(&self, test_dir: &str, mandatory_annotations: bool) -> Config {
|
||||
config.program.args.push(format!("--sysroot={sysroot}").into());
|
||||
}
|
||||
|
||||
let profile_path = target_dir.join(env!("PROFILE"));
|
||||
config.program.program = profile_path.join(if cfg!(windows) {
|
||||
"clippy-driver.exe"
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user