Bug 1230223 - Talos should exit early on TART timeout. r=jmaher
authorJulien Pagès <j.parkouss@gmail.com>
Thu, 03 Dec 2015 18:54:46 +0100
changeset 275681 b57cc7221eecae683868a2e3bff413cf079c3263
parent 275680 61ffbe61bf04dd4effee72608ca8f3a3f256fbe6
child 275682 949161bdd28a3d8ad4b50fa18fa9af53a1267571
push id68904
push usercbook@mozilla.com
push dateFri, 04 Dec 2015 15:01:29 +0000
treeherdermozilla-inbound@949161bdd28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1230223
milestone45.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 1230223 - Talos should exit early on TART timeout. r=jmaher
testing/talos/talos/talos_process.py
--- a/testing/talos/talos/talos_process.py
+++ b/testing/talos/talos/talos_process.py
@@ -35,22 +35,28 @@ class ProcessContext(object):
                 # will raise TimeoutExpired if unable to kill
                 self.process.wait(3)
 
 
 class Reader(object):
     def __init__(self, event):
         self.output = []
         self.got_end_timestamp = False
+        self.got_timeout = False
+        self.timeout_message = ''
         self.event = event
 
     def __call__(self, line):
         if line.find('__endTimestamp') != -1:
             self.got_end_timestamp = True
             self.event.set()
+        elif line == 'TART: TIMEOUT':
+            self.got_timeout = True
+            self.timeout_message = 'TART'
+            self.event.set()
 
         if not (line.startswith('JavaScript error:') or
                 line.startswith('JavaScript warning:')):
             logging.debug('BROWSER_OUTPUT: %s', line)
             self.output.append(line)
 
 
 def run_browser(command, minidump_dir, timeout=None, on_started=None,
@@ -103,16 +109,18 @@ def run_browser(command, minidump_dir, t
             for i in range(1, wait_for_quit_timeout):
                 if proc.wait(1) is not None:
                     break
             if proc.poll() is None:
                 logging.info(
                     "Browser shutdown timed out after {0} seconds, terminating"
                     " process.".format(wait_for_quit_timeout)
                 )
+        elif reader.got_timeout:
+            raise TalosError('TIMEOUT: %s' % reader.timeout_message)
     finally:
         # this also handle KeyboardInterrupt
         # ensure early the process is really terminated
         context.kill_process()
         return_code = proc.wait(1)
 
     reader.output.append(
         "__startBeforeLaunchTimestamp%d__endBeforeLaunchTimestamp"