Skip to content

Commit

Permalink
Auto merge of rust-lang#9307 - ijackson:exit-code-string, r=joshtriplett
Browse files Browse the repository at this point in the history
tests: Tolerate "exit status" in error messages

"exit code" is wrong terminology on Unix.  I am trying to fix this in Rust stdlib in rust-lang/rust#83462 but this currently breaks the cargo test suite.

See that MR for full explanation of the change.
  • Loading branch information
bors authored and ehuss committed Apr 6, 2021
1 parent e668552 commit 6ce927a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/testsuite/build_script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fn custom_build_script_failed() {
[ERROR] failed to run custom build command for `foo v0.5.0 ([CWD])`
Caused by:
process didn't exit successfully: `[..]/build-script-build` (exit code: 101)",
process didn't exit successfully: `[..]/build-script-build` (exit [..]: 101)",
)
.run();
}
Expand Down
4 changes: 2 additions & 2 deletions tests/testsuite/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ fn exit_code() {
);
if !cfg!(unix) {
output.push_str(
"[ERROR] process didn't exit successfully: `target[..]foo[..]` (exit code: 2)",
"[ERROR] process didn't exit successfully: `target[..]foo[..]` (exit [..]: 2)",
);
}
p.cargo("run").with_status(2).with_stderr(output).run();
Expand All @@ -140,7 +140,7 @@ fn exit_code_verbose() {
);
if !cfg!(unix) {
output.push_str(
"[ERROR] process didn't exit successfully: `target[..]foo[..]` (exit code: 2)",
"[ERROR] process didn't exit successfully: `target[..]foo[..]` (exit [..]: 2)",
);
}

Expand Down

0 comments on commit 6ce927a

Please sign in to comment.