Bug 1398933 - Ensure test-verify bails out before timing out; r=jmaher
authorGeoff Brown <gbrown@mozilla.com>
Tue, 12 Sep 2017 08:51:21 -0600
changeset 429799 b805cc36637b7fbd97daf258bbfb4961bacb4e69
parent 429798 9ade9aba5dac6a8ef1429138ad4288aad5917d57
child 429800 bf6e51ea07a7ed46ee55f53bb67cf3ed7e7b1282
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1398933
milestone57.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 1398933 - Ensure test-verify bails out before timing out; r=jmaher
testing/mozharness/scripts/desktop_unittest.py
--- a/testing/mozharness/scripts/desktop_unittest.py
+++ b/testing/mozharness/scripts/desktop_unittest.py
@@ -756,16 +756,18 @@ class DesktopUnittest(TestingMixin, Merc
                 cmd_timeout = self.get_timeout_for_category(suite_category)
 
                 for verify_args in self.query_verify_args(suite):
                     if (datetime.now() - start_time) > max_verify_time:
                         # Verification has run out of time. That is okay! Stop running
                         # tests so that a task timeout is not triggered, and so that
                         # (partial) results are made available in a timely manner.
                         self.info("TinderboxPrint: Verification too long: Not all tests were verified.<br/>")
+                        # Signal verify time exceeded, to break out of suites loop also.
+                        max_verify_time = 0
                         break
                     final_cmd = copy.copy(cmd)
                     final_cmd.extend(verify_args)
                     return_code = self.run_command(final_cmd, cwd=dirs['abs_work_dir'],
                                                    output_timeout=cmd_timeout,
                                                    output_parser=parser,
                                                    env=env)
 
@@ -790,16 +792,20 @@ class DesktopUnittest(TestingMixin, Merc
 
                     self.buildbot_status(tbpl_status, level=log_level)
                     if len(verify_args) > 0:
                         self.log("TinderboxPrint: verification of %s in %s<br/>: %s" %
                                  (verify_args[-1], suite, tbpl_status), level=log_level)
                     else:
                         self.log("The %s suite: %s ran with return status: %s" %
                                  (suite_category, suite, tbpl_status), level=log_level)
+
+                if max_verify_time <= 0:
+                    # Verification ran out of time, detected in inner loop.
+                    break
         else:
             self.debug('There were no suites to run for %s' % suite_category)
 
 
 # main {{{1
 if __name__ == '__main__':
     desktop_unittest = DesktopUnittest()
     desktop_unittest.run_and_exit()