Bug 1466573 - Avoid resetting stdout + stderr. r?whimboo draft
authorAndreas Tolfsen <ato@sny.no>
Tue, 05 Jun 2018 15:08:52 +0100
changeset 804256 c7f4d1e9c695dd65f66cd8e69927cf4b6206f338
parent 804255 6bfb167da76f5c290de403817bb547814812493e
child 804257 ff0d995f4f6cb6e50a4b7eb088ede1176098c660
push id112328
push userbmo:ato@sny.no
push dateTue, 05 Jun 2018 17:17:40 +0000
reviewerswhimboo
bugs1466573
milestone62.0a1
Bug 1466573 - Avoid resetting stdout + stderr. r?whimboo The std::process::Command's stdout and stderr is configured earlier in ::start(), and resetting it to a static value below would invalidate the configured stdout and stderr stored in FirefoxRunner::stdout and ::stderr. We did not notice this bug because geckodriver does not yet use this feature. It was added as a precursor for https://bugzilla.mozilla.org/show_bug.cgi?id=1466573. MozReview-Commit-ID: CmwqCZpEMqq
testing/mozbase/rust/mozrunner/src/runner.rs
--- a/testing/mozbase/rust/mozrunner/src/runner.rs
+++ b/testing/mozbase/rust/mozrunner/src/runner.rs
@@ -261,17 +261,16 @@ impl Runner for FirefoxRunner {
         cmd.args(&self.args[..])
             .envs(&self.envs)
             .stdout(stdout)
             .stderr(stderr);
 
         if !self.args.iter().any(|x| is_profile_arg(x)) {
             cmd.arg("-profile").arg(&self.profile.path);
         }
-        cmd.stdout(Stdio::inherit()).stderr(Stdio::inherit());
 
         info!("Running command: {:?}", cmd);
         let process = cmd.spawn()?;
         Ok(FirefoxProcess {
             process,
             profile: self.profile
         })
     }