Skip to content

Commit

Permalink
Rollup merge of #121091 - onur-ozkan:bypass-stage0-download-in-tests,…
Browse files Browse the repository at this point in the history
… r=albertlarsan68

use build.rustc config and skip-stage0-validation flag

This change helps us to bypass downloading the beta compiler in bootstrap tests.

more context: https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/tests.20causing.20downloads.20of.20native.20rustc.20for.20other.20platforms/near/421467975
  • Loading branch information
matthiaskrgr authored Feb 17, 2024
2 parents 45d5773 + 0925ff8 commit 60cc6b9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/bootstrap/src/core/config/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@ use std::{
};

fn parse(config: &str) -> Config {
Config::parse_inner(&["check".to_owned(), "--config=/does/not/exist".to_owned()], |&_| {
toml::from_str(config).unwrap()
})
let config = format!("{config} \r\n build.rustc = \"/does-not-exists\" ");
Config::parse_inner(
&[
"check".to_owned(),
"--config=/does/not/exist".to_owned(),
"--skip-stage0-validation".to_owned(),
],
|&_| toml::from_str(&config).unwrap(),
)
}

#[test]
Expand Down

0 comments on commit 60cc6b9

Please sign in to comment.