Skip to content

Commit 526f747

Browse files
committed
Auto merge of #10660 - ehuss:fix-no_cross_doctests-race, r=weihanglo
Fix no_cross_doctests race condition. The change in #10594 to the `no_cross_doctests` test introduced a race condition. The two `rustc` invocations happen concurrently, which means the order is not deterministic. This adds`_unordered` along with differentiating text to fix the issue.
2 parents cf09f37 + e952070 commit 526f747

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/testsuite/cross_compile.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,10 +594,11 @@ fn no_cross_doctests() {
594594
let target = rustc_host();
595595
p.cargo("test -v --target")
596596
.arg(&target)
597-
.with_stderr(&format!(
597+
// Unordered since the two `rustc` invocations happen concurrently.
598+
.with_stderr_unordered(&format!(
598599
"\
599600
[COMPILING] foo v0.0.1 ([CWD])
600-
[RUNNING] `rustc --crate-name foo [..]
601+
[RUNNING] `rustc --crate-name foo [..]--crate-type lib[..]
601602
[RUNNING] `rustc --crate-name foo [..]--test[..]
602603
[FINISHED] test [unoptimized + debuginfo] target(s) in [..]
603604
[RUNNING] `[CWD]/target/{target}/debug/deps/foo-[..][EXE]`

0 commit comments

Comments
 (0)