mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Fix race condition in panic_abort_tests
This commit is contained in:
parent
fcb79a5c45
commit
be6598b7f0
@ -5009,7 +5009,11 @@ fn panic_abort_tests() {
|
|||||||
.file("a/src/lib.rs", "pub fn foo() {}")
|
.file("a/src/lib.rs", "pub fn foo() {}")
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
p.cargo("test -Z panic-abort-tests -v")
|
// This uses -j1 because of a race condition. Otherwise it will build the
|
||||||
|
// two copies of `foo` in parallel, and which one is first is random. If
|
||||||
|
// `--test` is first, then the first line with `[..]` will match, and the
|
||||||
|
// second line with `--test` will fail.
|
||||||
|
p.cargo("test -Z panic-abort-tests -v -j1")
|
||||||
.with_stderr_data(
|
.with_stderr_data(
|
||||||
str![[r#"
|
str![[r#"
|
||||||
[RUNNING] `[..]--crate-name a [..]-C panic=abort[..]`
|
[RUNNING] `[..]--crate-name a [..]-C panic=abort[..]`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user