Skip to content

Commit 68da15e

Browse files
committed
Auto merge of #51596 - Mark-Simulacrum:bootstrap-racy-tests, r=petrochenkov
Prevent Windows filesystem races in bootstrap tests Fixes #51595. This also makes bootstrap tests run near last in `./x.py test` invocations since they are unlikely to fail. r? @petrochenkov
2 parents ae46aef + b436dca commit 68da15e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/bootstrap/builder.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,6 @@ impl<'a> Builder<'a> {
370370
),
371371
Kind::Test => describe!(
372372
test::Tidy,
373-
test::Bootstrap,
374373
test::Ui,
375374
test::RunPass,
376375
test::CompileFail,
@@ -416,6 +415,8 @@ impl<'a> Builder<'a> {
416415
test::Clippy,
417416
test::RustdocJS,
418417
test::RustdocTheme,
418+
// Run bootstrap close to the end as it's unlikely to fail
419+
test::Bootstrap,
419420
// Run run-make last, since these won't pass without make on Windows
420421
test::RunMake,
421422
test::RustdocUi

src/bootstrap/test.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1921,6 +1921,9 @@ impl Step for Bootstrap {
19211921
cmd.arg("--no-fail-fast");
19221922
}
19231923
cmd.arg("--").args(&builder.config.cmd.test_args());
1924+
// rustbuild tests are racy on directory creation so just run them one at a time.
1925+
// Since there's not many this shouldn't be a problem.
1926+
cmd.arg("--test-threads=1");
19241927
try_run(builder, &mut cmd);
19251928
}
19261929

0 commit comments

Comments
 (0)