Bug 1504357 - Make sure --repeat-until-unexpected doesn't loop over zero tests r=jgraham
authorWes Kocher <wkocher@mozilla.com>
Thu, 29 Nov 2018 17:12:18 +0000
changeset 507971 f988af9437f591cc5c7d3917ba370e2edc82d1a6
parent 507970 5ad19f2159391c4299c6b665794068e7567f38e3
child 507972 1d1b47e235375f3a52faafe37a2e560a98c5b51f
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1504357
milestone65.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 1504357 - Make sure --repeat-until-unexpected doesn't loop over zero tests r=jgraham If zero tests are selected to run while --repeat-until-unexpected is specified, wptrunner can get into a fast infinite loop of running nothing until killed by the user. This patch should stop that from happening by breaking the loop after the first iteration of nothing finishes. Differential Revision: https://phabricator.services.mozilla.com/D13204
testing/web-platform/tests/tools/wptrunner/wptrunner/wptrunner.py
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/wptrunner.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/wptrunner.py
@@ -279,16 +279,18 @@ def run_tests(config, test_paths, produc
                         unexpected_count += manager_group.unexpected_count()
 
                 test_total += test_count
                 unexpected_total += unexpected_count
                 logger.info("Got %i unexpected results" % unexpected_count)
                 logger.suite_end()
                 if repeat_until_unexpected and unexpected_total > 0:
                     break
+                if len(test_loader.test_ids) == skipped_tests:
+                    break;
 
     if test_total == 0:
         if skipped_tests > 0:
             logger.warning("All requested tests were skipped")
         else:
             logger.error("No tests ran")
             return False