Bug 1083131 - Always remove a profile created by marionette when the runner shuts down. r=ato
authorChris Manchester <cmanchester@mozilla.com>
Thu, 16 Apr 2015 18:04:24 -0700
changeset 240175 778e99b46052f44f8b3c42ad80de1a97bf42cd6b
parent 240174 24454f99189fb5df8f8d93e82ca4118973885729
child 240176 a82f563aec9492a478e1bd8c41439e4336893324
push id58759
push userryanvm@gmail.com
push dateTue, 21 Apr 2015 13:46:37 +0000
treeherdermozilla-inbound@4555ae9718d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato
bugs1083131
milestone40.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 1083131 - Always remove a profile created by marionette when the runner shuts down. r=ato
testing/marionette/driver/marionette_driver/geckoinstance.py
--- a/testing/marionette/driver/marionette_driver/geckoinstance.py
+++ b/testing/marionette/driver/marionette_driver/geckoinstance.py
@@ -63,17 +63,16 @@ class GeckoInstance(object):
                 "devtools.debugger.remote-enabled": True,
                 "devtools.chrome.enabled": True,
                 "devtools.debugger.prompt-connection": False,
                 "marionette.debugging.clicktostart": True,
             })
 
         if hasattr(self, "profile_path") and self.profile is None:
             if not self.profile_path:
-                profile_args["restore"] = False
                 self.profile = Profile(**profile_args)
             else:
                 profile_args["path_from"] = self.profile_path
                 self.profile = Profile.clone(**profile_args)
 
         process_args = {
             'processOutputLine': [NullOutput()],
         }
@@ -132,21 +131,22 @@ class GeckoInstance(object):
         if not restart:
             self.profile = None
 
         if self.runner:
             self.runner.stop()
             self.runner.cleanup()
 
     def restart(self, prefs=None, clean=True):
+        self.close(restart=True)
+
         if clean:
             self.profile.cleanup()
             self.profile = None
 
-        self.close(restart=True)
         if prefs:
             self.prefs = prefs
         else:
             self.prefs = None
         self.start()
 
 class B2GDesktopInstance(GeckoInstance):
     def __init__(self, host, port, bin, **kwargs):