Skip to content

Commit 7f3cf08

Browse files
authored
Rollup merge of rust-lang#121091 - onur-ozkan:bypass-stage0-download-in-tests, 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
2 parents e89fc18 + 0925ff8 commit 7f3cf08

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/bootstrap/src/core/config/tests.rs

+9-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@ use std::{
1111
};
1212

1313
fn parse(config: &str) -> Config {
14-
Config::parse_inner(&["check".to_owned(), "--config=/does/not/exist".to_owned()], |&_| {
15-
toml::from_str(config).unwrap()
16-
})
14+
let config = format!("{config} \r\n build.rustc = \"/does-not-exists\" ");
15+
Config::parse_inner(
16+
&[
17+
"check".to_owned(),
18+
"--config=/does/not/exist".to_owned(),
19+
"--skip-stage0-validation".to_owned(),
20+
],
21+
|&_| toml::from_str(&config).unwrap(),
22+
)
1723
}
1824

1925
#[test]

0 commit comments

Comments
 (0)