Bug 791346 - Fix Marionette shutdown problems on Windows, r=dburns, DONTBUILD because NPOTB

This commit is contained in:
Jonathan Griffin 2012-09-20 11:13:42 -07:00
parent f799aebc5f
commit f10c4d9a5b
4 changed files with 9 additions and 3 deletions

View File

@ -21,7 +21,8 @@ class GeckoInstance(object):
profile = self.profile
if not profile:
prefs = {"marionette.defaultPrefs.enabled": True,
"marionette.defaultPrefs.port": 2828}
"marionette.defaultPrefs.port": 2828,
"browser.warnOnQuit": False}
profile = {"preferences": prefs, "restore":False}
print "starting runner"
self.runner = Runner.create(binary=self.bin, profile_args=profile, cmdargs=['-no-remote'])

View File

@ -131,7 +131,7 @@ class Marionette(object):
def __del__(self):
if self.emulator:
self.emulator.close()
if self.bin:
if self.instance:
self.instance.close()
for qemu in self.extra_emulators:
qemu.emulator.close()

View File

@ -219,7 +219,7 @@ class MarionetteJSTestCase(CommonTestCase):
self.loglines = self.marionette.get_logs()
raise
self.marionette.execute_script("log('TEST-END: %s');" % self.jsFile)
self.marionette.execute_script("log('TEST-END: %s');" % self.jsFile.replace('\\', '\\\\'))

View File

@ -327,6 +327,11 @@ class MarionetteTestRunner(object):
with open(self.xml_output, 'w') as f:
f.write(self.generate_xml(self.results))
if self.marionette.instance:
self.marionette.instance.close()
self.marionette.instance = None
del self.marionette
def run_test(self, test, testtype):
if not self.httpd:
print "starting httpd"