Bug 1466573 - Avoid resetting stdout + stderr. r?whimboo draft
authorAndreas Tolfsen <ato@sny.no>
Tue, 05 Jun 2018 15:08:52 +0100
changeset 805871 219f9ded2066425c09e5b8e084ac968226490504
parent 805870 a7f4b7cc155d562c1df307d2b42534a7bf559e63
child 805872 102e18194281c249878130f0cb0719e5d8f505e3
child 805874 8a18225fa423f5d74c88e58b96e31c0070b42a7e
push id112791
push userbmo:ato@sny.no
push dateFri, 08 Jun 2018 16:51:38 +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
@@ -260,17 +260,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
         })
     }