From aa8da312afc6b654fbe84eb8d2c59937e3808597 Mon Sep 17 00:00:00 2001 From: Phil Ringnalda Date: Wed, 6 Jul 2016 19:29:57 -0700 Subject: [PATCH] Backed out changeset 6d1de18af810 (bug 1282570) for causing permaorange in debug OS X Marionette tests, a=backout --- .../client/marionette_driver/marionette.py | 13 +++++-------- testing/marionette/client/requirements.txt | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/testing/marionette/client/marionette_driver/marionette.py b/testing/marionette/client/marionette_driver/marionette.py index 638d66e32b13..5082677f500d 100644 --- a/testing/marionette/client/marionette_driver/marionette.py +++ b/testing/marionette/client/marionette_driver/marionette.py @@ -680,7 +680,7 @@ class Marionette(object): msg = self.client.request(name, params) except IOError: - if self.instance: + if self.instance and not hasattr(self.instance, 'detached'): # If we've launched the binary we've connected to, wait # for it to shut down. returncode = self.instance.runner.wait(timeout=self.DEFAULT_STARTUP_TIMEOUT) @@ -1037,20 +1037,17 @@ class Marionette(object): "eRestart", ] self._send_message("quitApplication", {"flags": restart_flags}) - self.delete_session() + self.client.close() + # The instance is restarting itself; we will no longer be able to + # track it by pid, so mark it as 'detached'. + self.instance.detached = True else: self.delete_session() self.instance.restart(clean=clean) - self.raise_for_port(self.wait_for_port()) self.start_session(session_id=self.session_id) self._reset_timeouts() - if in_app: - # In some cases Firefox restarts itself by spawning into a new process group. As long as - # mozrprocess cannot track that (bug 1176758) we assist by checking the new process id. - self.instance.runner.process_handler.check_for_detached(self.session['processId']) - def absolute_url(self, relative_url): ''' Returns an absolute url for files served from Marionette's www directory. diff --git a/testing/marionette/client/requirements.txt b/testing/marionette/client/requirements.txt index b251903579ec..a77e91f0e89f 100644 --- a/testing/marionette/client/requirements.txt +++ b/testing/marionette/client/requirements.txt @@ -1 +1 @@ -mozrunner >= 6.12 +mozrunner >= 6.9