Isolate the hook pipe I/O timeout test from shell startup files (#44297)

Run `hook_drains_output_and_times_out_while_stdin_is_blocked` with
`cmd.exe /D /C` on Windows and `/bin/sh -c` elsewhere to keep user shell
startup files out of the test.

GitOrigin-RevId: 296e65cf76b74543e91c9ed9024ba2442e7e33af
This commit is contained in:
jif
2026-09-09 20:26:55 +00:00
committed by copyberry
parent 72348693ec
commit 87cf20ee49
@@ -262,6 +262,19 @@ time.sleep(30)
let input_json = format!(r#"{{"padding":"{}"}}"#, "x".repeat(1024 * 1024));
let (runtime, _result_receiver) = runtime();
// Keep user shell startup files out of the pipe I/O timeout test.
let runtime = runtime.reconfigured(if cfg!(windows) {
CommandShell {
program: "cmd.exe".to_string(),
args: vec!["/D".to_string(), "/C".to_string()],
}
} else {
CommandShell {
program: "/bin/sh".to_string(),
args: vec!["-c".to_string()],
}
});
let result = timeout(
Duration::from_secs(10),
run_command(&runtime, &handler, command, env, &input_json, temp.path()),