Skip to content

Commit

Permalink
Auto merge of #10660 - ehuss:fix-no_cross_doctests-race, r=weihanglo
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed May 11, 2022
2 parents cf09f37 + e952070 commit 526f747
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/testsuite/cross_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,10 +594,11 @@ fn no_cross_doctests() {
let target = rustc_host();
p.cargo("test -v --target")
.arg(&target)
.with_stderr(&format!(
// Unordered since the two `rustc` invocations happen concurrently.
.with_stderr_unordered(&format!(
"\
[COMPILING] foo v0.0.1 ([CWD])
[RUNNING] `rustc --crate-name foo [..]
[RUNNING] `rustc --crate-name foo [..]--crate-type lib[..]
[RUNNING] `rustc --crate-name foo [..]--test[..]
[FINISHED] test [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `[CWD]/target/{target}/debug/deps/foo-[..][EXE]`
Expand Down

0 comments on commit 526f747

Please sign in to comment.