Skip to content

Commit 7eff2d9

Browse files
committed
Do not pass source root when building run-make tests
1 parent b74702f commit 7eff2d9

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Diff for: src/tools/compiletest/src/runtest.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3515,7 +3515,6 @@ impl<'test> TestCx<'test> {
35153515
.arg(&self.testpaths.file.join("rmake.rs"))
35163516
.env("TARGET", &self.config.target)
35173517
.env("PYTHON", &self.config.python)
3518-
.env("S", &src_root)
35193518
.env("RUST_BUILD_STAGE", &self.config.stage_id)
35203519
.env("RUSTC", cwd.join(&self.config.rustc_path))
35213520
.env("TMPDIR", &rmake_out_dir)

Diff for: tests/run-make/CURRENT_RUSTC_VERSION/rmake.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
use std::path::PathBuf;
77

8-
use run_make_support::{aux_build, rustc};
8+
use run_make_support::{aux_build, rustc, source_root};
99

1010
fn main() {
1111
aux_build().input("stable.rs").emit("metadata").run();
@@ -17,7 +17,7 @@ fn main() {
1717
rustc().input("main.rs").emit("metadata").extern_("stable", &stable_path).command_output();
1818

1919
let stderr = String::from_utf8_lossy(&output.stderr);
20-
let version = include_str!(concat!(env!("S"), "/src/version"));
20+
let version = std::fs::read_to_string(source_root().join("src/version")).unwrap();
2121
let expected_string = format!("stable since {}", version.trim());
2222
assert!(stderr.contains(&expected_string));
2323
}

0 commit comments

Comments
 (0)