Bug 1466573 - Avoid resetting stdout + stderr. r?jgraham draft
authorAndreas Tolfsen <ato@sny.no>
Tue, 05 Jun 2018 15:08:52 +0100
changeset 807496 1de7a3680aa29396029e34cbd60163694ff015f6
parent 807493 db50c534433534070409a2d6766050f5f9c5db39
child 807497 da8c831ca050a4c1e54305aa8d829da6e271af83
push id113125
push userbmo:ato@sny.no
push dateThu, 14 Jun 2018 17:50:24 +0000
reviewersjgraham
bugs1466573
milestone62.0a1
Bug 1466573 - Avoid resetting stdout + stderr. r?jgraham 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
         })
     }