From fe8f588263bf5ad3ae932a9c6be476672eac74fb Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 26 Mar 2021 16:18:37 +0000 Subject: [PATCH] tests: Tolerate "exit status" in error messages "exit code" is wrong terminology on Unix. I am trying to fix this in Rust stdlib in https://github.com/rust-lang/rust/pull/83462 but this currently breaks the cargo test suite. See that MR for full explanation of the change. Signed-off-by: Ian Jackson --- tests/testsuite/build_script.rs | 2 +- tests/testsuite/run.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/testsuite/build_script.rs b/tests/testsuite/build_script.rs index ddaa9a5edd5..ab725d0b930 100644 --- a/tests/testsuite/build_script.rs +++ b/tests/testsuite/build_script.rs @@ -37,7 +37,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(); } diff --git a/tests/testsuite/run.rs b/tests/testsuite/run.rs index 5b2f274cda3..106e2259fc4 100644 --- a/tests/testsuite/run.rs +++ b/tests/testsuite/run.rs @@ -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(); @@ -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)", ); }