|
7 | 7 | //! to reimplement all the rendering logic in this module because of that. |
8 | 8 |
|
9 | 9 | use std::io::{BufRead, BufReader, Read, Write}; |
10 | | -use std::process::{ChildStdout, Stdio}; |
| 10 | +use std::process::ChildStdout; |
11 | 11 | use std::time::Duration; |
12 | 12 |
|
13 | 13 | use termcolor::{Color, ColorSpec, WriteColor}; |
@@ -52,23 +52,23 @@ pub(crate) fn try_run_tests( |
52 | 52 | } |
53 | 53 |
|
54 | 54 | fn run_tests(builder: &Builder<'_>, cmd: &mut BootstrapCommand, stream: bool) -> bool { |
55 | | - let cmd = cmd.as_command_mut(); |
56 | | - cmd.stdout(Stdio::piped()); |
| 55 | + let cmd = cmd.do_not_cache(); |
57 | 56 |
|
58 | 57 | builder.verbose(|| println!("running: {cmd:?}")); |
59 | 58 |
|
60 | | - let mut process = cmd.spawn().unwrap(); |
| 59 | + let mut streaming_command = |
| 60 | + cmd.start_capture_stdout(&builder.config.exec_ctx).stream().unwrap(); |
61 | 61 |
|
62 | 62 | // This runs until the stdout of the child is closed, which means the child exited. We don't |
63 | 63 | // run this on another thread since the builder is not Sync. |
64 | | - let renderer = Renderer::new(process.stdout.take().unwrap(), builder); |
| 64 | + let renderer = Renderer::new(streaming_command.stdout.take().unwrap(), builder); |
65 | 65 | if stream { |
66 | 66 | renderer.stream_all(); |
67 | 67 | } else { |
68 | 68 | renderer.render_all(); |
69 | 69 | } |
70 | 70 |
|
71 | | - let result = process.wait_with_output().unwrap(); |
| 71 | + let result = streaming_command.wait_with_output().unwrap(); |
72 | 72 | if !result.status.success() && builder.is_verbose() { |
73 | 73 | println!( |
74 | 74 | "\n\ncommand did not execute successfully: {cmd:?}\n\ |
|
0 commit comments