Bug 1466573 - Avoid resetting stdout + stderr. r=jgraham
authorAndreas Tolfsen <ato@sny.no>
Tue, 05 Jun 2018 15:08:52 +0100
changeset 422625 d264fabbfb132061f8154739e740077f8111663e
parent 422624 cfc5d5a963329994f779ad190e7f903efe81095f
child 422626 c5c9371e1527ac814503222f80bd6f4983eed373
push id34139
push useraciure@mozilla.com
push dateFri, 15 Jun 2018 09:48:05 +0000
treeherdermozilla-central@dc997a4e045e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1466573
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
         })
     }