Skip to content

Commit d2d4b06

Browse files
committed
Auto merge of #10092 - ChrisDenton:tmp-match-err, r=alexcrichton
Match any error when failing to find executables For Windows targets, Rust now uses [a custom resolver](rust-lang/rust#87704) to find `process::Command` programs. This has caused some error messages to change. To allow the PR to be merged, some tests have been adjusted to match any error. cc `@ehuss`
2 parents aed9723 + 93bcd97 commit d2d4b06

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

tests/testsuite/credential_process.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -403,13 +403,16 @@ fn libexec_path() {
403403
.masquerade_as_nightly_cargo()
404404
.with_status(101)
405405
.with_stderr(
406+
// FIXME: Update "Caused by" error message once rust/pull/87704 is merged.
407+
// On Windows, changing to a custom executable resolver has changed the
408+
// error messages.
406409
&format!("\
407410
[UPDATING] [..]
408411
[ERROR] failed to execute `[..]libexec/cargo-credential-doesnotexist[EXE]` to store authentication token for registry `crates-io`
409412
410413
Caused by:
411-
{}
412-
", cargo_test_support::no_such_file_err_msg()),
414+
[..]
415+
"),
413416
)
414417
.run();
415418
}

tests/testsuite/tool_paths.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//! Tests for configuration values that point to programs.
22
3-
use cargo_test_support::{
4-
basic_lib_manifest, no_such_file_err_msg, project, rustc_host, rustc_host_env,
5-
};
3+
use cargo_test_support::{basic_lib_manifest, project, rustc_host, rustc_host_env};
64

75
#[cargo_test]
86
fn pathless_tools() {
@@ -271,6 +269,9 @@ fn custom_runner_env() {
271269
p.cargo("run")
272270
.env(&key, "nonexistent-runner --foo")
273271
.with_status(101)
272+
// FIXME: Update "Caused by" error message once rust/pull/87704 is merged.
273+
// On Windows, changing to a custom executable resolver has changed the
274+
// error messages.
274275
.with_stderr(&format!(
275276
"\
276277
[COMPILING] foo [..]
@@ -279,9 +280,8 @@ fn custom_runner_env() {
279280
[ERROR] could not execute process `nonexistent-runner --foo target/debug/foo[EXE]` (never executed)
280281
281282
Caused by:
282-
{}
283-
",
284-
no_such_file_err_msg()
283+
[..]
284+
"
285285
))
286286
.run();
287287
}

0 commit comments

Comments
 (0)