Skip to content

Commit 95a8756

Browse files
committed
Revert "opt-dist: dont overrwite config.toml when verifying"
This reverts commit c81a40b. This commit appears to have changed which rustc and cargo versions are used for some areas of tooling, which meant it was not possible to do a beta bump. Revert to test. Discussion: https://rust-lang.zulipchat.com/#narrow/stream/241545-t-release/topic/1.2E81.20stage0.20bump
1 parent 5a5bf73 commit 95a8756

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

src/tools/opt-dist/src/tests.rs

+17-14
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,26 @@ pub fn run_tests(env: &Environment) -> anyhow::Result<()> {
6060
.join(format!("llvm-config{}", executable_extension()));
6161
assert!(llvm_config.is_file());
6262

63-
let rustc = format!("build.rustc={}", rustc_path.to_string().replace('\\', "/"));
64-
let cargo = format!("build.cargo={}", cargo_path.to_string().replace('\\', "/"));
65-
let llvm_config =
66-
format!("target.{host_triple}.llvm-config={}", llvm_config.to_string().replace('\\', "/"));
63+
let config_content = format!(
64+
r#"profile = "user"
65+
change-id = 115898
6766
68-
log::info!("Set the following configurations for running tests:");
69-
log::info!("\t{rustc}");
70-
log::info!("\t{cargo}");
71-
log::info!("\t{llvm_config}");
67+
[build]
68+
rustc = "{rustc}"
69+
cargo = "{cargo}"
70+
71+
[target.{host_triple}]
72+
llvm-config = "{llvm_config}"
73+
"#,
74+
rustc = rustc_path.to_string().replace('\\', "/"),
75+
cargo = cargo_path.to_string().replace('\\', "/"),
76+
llvm_config = llvm_config.to_string().replace('\\', "/")
77+
);
78+
log::info!("Using following `config.toml` for running tests:\n{config_content}");
7279

7380
// Simulate a stage 0 compiler with the extracted optimized dist artifacts.
81+
std::fs::write("config.toml", config_content)?;
82+
7483
let x_py = env.checkout_path().join("x.py");
7584
let mut args = vec![
7685
env.python_binary(),
@@ -89,12 +98,6 @@ pub fn run_tests(env: &Environment) -> anyhow::Result<()> {
8998
"tests/run-pass-valgrind",
9099
"tests/ui",
91100
"tests/crashes",
92-
"--set",
93-
&rustc,
94-
"--set",
95-
&cargo,
96-
"--set",
97-
&llvm_config,
98101
];
99102
for test_path in env.skipped_tests() {
100103
args.extend(["--skip", test_path]);

0 commit comments

Comments
 (0)