Skip to content

Commit afed561

Browse files
Specify output directory for bootstrap tests
1 parent aac7d9e commit afed561

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/bootstrap/builder/tests.rs

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ fn configure(cmd: &str, host: &[&str], target: &[&str]) -> Config {
1010
config.dry_run = true;
1111
config.ninja_in_file = false;
1212
// try to avoid spurious failures in dist where we create/delete each others file
13+
config.out = PathBuf::from(env::var_os("BOOTSTRAP_OUTPUT_DIRECTORY").unwrap());
14+
config.initial_rustc = PathBuf::from(env::var_os("RUSTC").unwrap());
15+
config.initial_cargo = PathBuf::from(env::var_os("BOOTSTRAP_INITIAL_CARGO").unwrap());
1316
let dir = config
1417
.out
1518
.join("tmp-rustbuild-tests")

src/bootstrap/test.rs

+2
Original file line numberDiff line numberDiff line change
@@ -2022,6 +2022,8 @@ impl Step for Bootstrap {
20222022
.current_dir(builder.src.join("src/bootstrap"))
20232023
.env("RUSTFLAGS", "-Cdebuginfo=2")
20242024
.env("CARGO_TARGET_DIR", builder.out.join("bootstrap"))
2025+
.env("BOOTSTRAP_OUTPUT_DIRECTORY", &builder.config.out)
2026+
.env("BOOTSTRAP_INITIAL_CARGO", &builder.config.initial_cargo)
20252027
.env("RUSTC_BOOTSTRAP", "1")
20262028
.env("RUSTC", &builder.initial_rustc);
20272029
if let Some(flags) = option_env!("RUSTFLAGS") {

0 commit comments

Comments
 (0)