diff options
| author | Joshua Nelson <jnelson@cloudflare.com> | 2022-03-23 18:23:26 -0500 |
|---|---|---|
| committer | Joshua Nelson <jnelson@cloudflare.com> | 2022-04-09 11:40:35 -0500 |
| commit | a0de44f469c22d10c3aada165ae6afd38d40ad2c (patch) | |
| tree | 8b2f59ec27c1a9da5d885fec51d28208da0b230b /src/bootstrap/builder | |
| parent | 5f4e0677190b82e61dc507e3e72caf89da8e5e28 (diff) | |
| download | rust-a0de44f469c22d10c3aada165ae6afd38d40ad2c.tar.gz rust-a0de44f469c22d10c3aada165ae6afd38d40ad2c.zip | |
Make it possible to run `cargo test` for bootstrap
Note that this only runs bootstrap's self-tests, not compiler or library tests.
Diffstat (limited to 'src/bootstrap/builder')
| -rw-r--r-- | src/bootstrap/builder/tests.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/bootstrap/builder/tests.rs b/src/bootstrap/builder/tests.rs index b76bb569852..a59f72ed968 100644 --- a/src/bootstrap/builder/tests.rs +++ b/src/bootstrap/builder/tests.rs @@ -8,12 +8,9 @@ fn configure(cmd: &str, host: &[&str], target: &[&str]) -> Config { config.save_toolstates = None; config.dry_run = true; config.ninja_in_file = false; - config.out = PathBuf::from(env::var_os("BOOTSTRAP_OUTPUT_DIRECTORY").unwrap()); - config.initial_rustc = PathBuf::from(env::var_os("RUSTC").unwrap()); - config.initial_cargo = PathBuf::from(env::var_os("BOOTSTRAP_INITIAL_CARGO").unwrap()); // try to avoid spurious failures in dist where we create/delete each others file - let dir = config - .out + // HACK: rather than pull in `tempdir`, use the one that cargo has conveniently created for us + let dir = Path::new(env!("OUT_DIR")) .join("tmp-rustbuild-tests") .join(&thread::current().name().unwrap_or("unknown").replace(":", "-")); t!(fs::create_dir_all(&dir)); |
