From 84ed40dc38cff2a25f0d6e6be1f11b3c1a12133d Mon Sep 17 00:00:00 2001 From: Jieyou Xu Date: Fri, 9 May 2025 19:52:36 +0800 Subject: [PATCH] tests: fix `broken-pipe-no-ice` to use `bare_rustc`/`rustc` Where host compiler runtime libs are properly configured, instead of raw `RUSTC`/`RUSTDOC` commands. Co-authored-by: Jesus Checa Hidalgo --- tests/run-make/broken-pipe-no-ice/rmake.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/run-make/broken-pipe-no-ice/rmake.rs b/tests/run-make/broken-pipe-no-ice/rmake.rs index 0521b3950207..b0a28b6c899d 100644 --- a/tests/run-make/broken-pipe-no-ice/rmake.rs +++ b/tests/run-make/broken-pipe-no-ice/rmake.rs @@ -14,7 +14,7 @@ use std::io::Read; use std::process::{Command, Stdio}; -use run_make_support::env_var; +use run_make_support::{bare_rustc, rustdoc}; #[derive(Debug, PartialEq)] enum Binary { @@ -67,11 +67,13 @@ fn check_broken_pipe_handled_gracefully(bin: Binary, mut cmd: Command) { } fn main() { - let mut rustc = Command::new(env_var("RUSTC")); + let mut rustc = bare_rustc(); rustc.arg("--print=sysroot"); + let rustc = rustc.into_raw_command(); check_broken_pipe_handled_gracefully(Binary::Rustc, rustc); - let mut rustdoc = Command::new(env_var("RUSTDOC")); + let mut rustdoc = rustdoc(); rustdoc.arg("--version"); + let rustdoc = rustdoc.into_raw_command(); check_broken_pipe_handled_gracefully(Binary::Rustdoc, rustdoc); }