Bug 969146 - DeviceRunner should always check for crashes onFinish, r=davehunt
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Thu, 14 Aug 2014 10:24:47 -0400
changeset 221162 025955aed95e13991be29731ede037b216eb4e37
parent 221161 ee2ce6de36701dd7b961489723c75ba46ea138d4
child 221163 a39d2cf1181e3c0bae71d2782014db116ab1ff9a
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdavehunt
bugs969146
milestone34.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 969146 - DeviceRunner should always check for crashes onFinish, r=davehunt
testing/mozbase/mozrunner/mozrunner/base/device.py
--- a/testing/mozbase/mozrunner/mozrunner/base/device.py
+++ b/testing/mozbase/mozrunner/mozrunner/base/device.py
@@ -32,16 +32,17 @@ class DeviceRunner(BaseRunner):
     def __init__(self, device_class, device_args=None, **kwargs):
         process_log = tempfile.NamedTemporaryFile(suffix='pidlog')
         self._env = dict(self.env)
         self._env['MOZ_PROCESS_LOG'] = process_log.name
         self._env.update(kwargs.pop('env', {}) or {})
 
         process_args = {'stream': sys.stdout,
                         'processOutputLine': self.on_output,
+                        'onFinish': self.on_finish,
                         'onTimeout': self.on_timeout }
         process_args.update(kwargs.get('process_args') or {})
 
         kwargs['process_args'] = process_args
         kwargs['env'] = {}
         BaseRunner.__init__(self, **kwargs)
 
         device_args = device_args or {}
@@ -117,15 +118,18 @@ class DeviceRunner(BaseRunner):
             timeout = self.timeout
         else:
             timeout = self.output_timeout
             msg = "%s with no output" % msg
 
         print(msg % (self.last_test, timeout))
         self.check_for_crashes()
 
+    def on_finish(self):
+        self.check_for_crashes()
+
     def check_for_crashes(self):
         dump_dir = self.device.pull_minidumps()
         BaseRunner.check_for_crashes(self, dump_directory=dump_dir, test_name=self.last_test)
 
     def cleanup(self, *args, **kwargs):
         BaseRunner.cleanup(self, *args, **kwargs)
         self.device.cleanup()