Skip to content

Commit 4fd148c

Browse files
committed
Auto merge of #10934 - ehuss:revert-jobserver, r=epage
Revert "Drop check for mingw32-make." This reverts 8e35e2f which seems to be causing a problem on rust-lang/rust Windows CI. I don't have time to investigate why it is failing right now. The Windows CI runs underneath make itself, so there is some recursive make action going on. However, I can't tell why that would cause failures. Cargo is behaving as-if it is not running underneath make. I'll try to do some investigation at a later time, for now I'd like to get the update unblocked.
2 parents 333478d + 8bf7b8b commit 4fd148c

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

tests/testsuite/jobserver.rs

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
//! Tests for the jobserver protocol.
22
3+
use cargo_util::is_ci;
34
use std::net::TcpListener;
5+
use std::process::Command;
46
use std::thread;
57

68
use cargo_test_support::{cargo_exe, project};
@@ -56,8 +58,17 @@ fn jobserver_exists() {
5658
p.cargo("build -j2").run();
5759
}
5860

59-
#[cargo_test(requires_make)]
61+
#[cargo_test]
6062
fn makes_jobserver_used() {
63+
let make = if cfg!(windows) {
64+
"mingw32-make"
65+
} else {
66+
"make"
67+
};
68+
if !is_ci() && Command::new(make).arg("--version").output().is_err() {
69+
return;
70+
}
71+
6172
let p = project()
6273
.file(
6374
"Cargo.toml",
@@ -151,7 +162,7 @@ all:
151162
drop((a2, a3));
152163
});
153164

154-
p.process("make")
165+
p.process(make)
155166
.env("CARGO", cargo_exe())
156167
.env("ADDR", addr.to_string())
157168
.arg("-j2")
@@ -161,6 +172,15 @@ all:
161172

162173
#[cargo_test]
163174
fn jobserver_and_j() {
175+
let make = if cfg!(windows) {
176+
"mingw32-make"
177+
} else {
178+
"make"
179+
};
180+
if !is_ci() && Command::new(make).arg("--version").output().is_err() {
181+
return;
182+
}
183+
164184
let p = project()
165185
.file("src/lib.rs", "")
166186
.file(
@@ -172,7 +192,7 @@ all:
172192
)
173193
.build();
174194

175-
p.process("make")
195+
p.process(make)
176196
.env("CARGO", cargo_exe())
177197
.arg("-j2")
178198
.with_stderr(

0 commit comments

Comments
 (0)