Skip to content

Commit fe8f588

Browse files
committed
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. Signed-off-by: Ian Jackson <[email protected]>
1 parent f16bfc2 commit fe8f588

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/testsuite/build_script.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn custom_build_script_failed() {
3737
[ERROR] failed to run custom build command for `foo v0.5.0 ([CWD])`
3838
3939
Caused by:
40-
process didn't exit successfully: `[..]/build-script-build` (exit code: 101)",
40+
process didn't exit successfully: `[..]/build-script-build` (exit [..]: 101)",
4141
)
4242
.run();
4343
}

tests/testsuite/run.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ fn exit_code() {
118118
);
119119
if !cfg!(unix) {
120120
output.push_str(
121-
"[ERROR] process didn't exit successfully: `target[..]foo[..]` (exit code: 2)",
121+
"[ERROR] process didn't exit successfully: `target[..]foo[..]` (exit [..]: 2)",
122122
);
123123
}
124124
p.cargo("run").with_status(2).with_stderr(output).run();
@@ -140,7 +140,7 @@ fn exit_code_verbose() {
140140
);
141141
if !cfg!(unix) {
142142
output.push_str(
143-
"[ERROR] process didn't exit successfully: `target[..]foo[..]` (exit code: 2)",
143+
"[ERROR] process didn't exit successfully: `target[..]foo[..]` (exit [..]: 2)",
144144
);
145145
}
146146

0 commit comments

Comments
 (0)