зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1287591 - The application should not be started and left open if filtering of a single manifest file does not find any test r=automatedtester
MozReview-Commit-ID: BjkwyQilCEE --HG-- extra : rebase_source : 7c4685492d9f474cb1bcf80e090a474890cab30f
This commit is contained in:
Родитель
8a0ce84d5e
Коммит
298a81fa15
|
@ -669,11 +669,7 @@ class BaseMarionetteTestRunner(object):
|
|||
"""
|
||||
self._bin = path
|
||||
self.tests = []
|
||||
if hasattr(self, 'marionette') and self.marionette:
|
||||
self.marionette.cleanup()
|
||||
if self.marionette.instance:
|
||||
self.marionette.instance = None
|
||||
self.marionette = None
|
||||
self.cleanup()
|
||||
|
||||
def reset_test_stats(self):
|
||||
self.passed = 0
|
||||
|
@ -896,16 +892,17 @@ setReq.onerror = function() {
|
|||
# we want to display current test results.
|
||||
# so we keep the exception to raise it later.
|
||||
interrupted = sys.exc_info()
|
||||
except:
|
||||
# For any other exception we return immediately and have to
|
||||
# cleanup running processes
|
||||
self.cleanup()
|
||||
raise
|
||||
|
||||
try:
|
||||
self._print_summary(tests)
|
||||
self.record_crash()
|
||||
self.elapsedtime = time.time() - start_time
|
||||
|
||||
if self.marionette.instance:
|
||||
self.marionette.instance.close()
|
||||
self.marionette.instance = None
|
||||
self.marionette.cleanup()
|
||||
|
||||
for run_tests in self.mixin_run_tests:
|
||||
run_tests(tests)
|
||||
if self.shuffle:
|
||||
|
@ -918,6 +915,8 @@ setReq.onerror = function() {
|
|||
if not interrupted:
|
||||
raise
|
||||
finally:
|
||||
self.cleanup()
|
||||
|
||||
# reraise previous interruption now
|
||||
if interrupted:
|
||||
raise interrupted[0], interrupted[1], interrupted[2]
|
||||
|
@ -1090,10 +1089,16 @@ setReq.onerror = function() {
|
|||
self.run_test_set(self.tests)
|
||||
|
||||
def cleanup(self):
|
||||
if self.httpd:
|
||||
if hasattr(self, 'httpd') and self.httpd:
|
||||
self.httpd.stop()
|
||||
self.httpd = None
|
||||
|
||||
if hasattr(self, 'marionette') and self.marionette:
|
||||
if self.marionette.instance:
|
||||
self.marionette.instance.close()
|
||||
self.marionette.instance = None
|
||||
|
||||
if self.marionette:
|
||||
self.marionette.cleanup()
|
||||
self.marionette = None
|
||||
|
||||
__del__ = cleanup
|
||||
|
|
Загрузка…
Ссылка в новой задаче