Changeset 58183 in webkit


Ignore:
Timestamp:
Apr 23, 2010 12:43:12 PM (14 years ago)
Author:
dpranke@chromium.org
Message:

2010-04-19 Dirk Pranke <dpranke@chromium.org>

Reviewed by Adam Barth.

new-run-webkit-tests: add a "--retry-failures" flag and a
"--no-retry-failures" flag (the former is the default). Also, rename
"--print-unexpected-results" and "--retry-unexpected-results" to
"--print-last-failures" and "--retry-last-failures" because the
retry flag was confusing. The new flag names aren't great, but
hopefully they're less confusing.

https://bugs.webkit.org/show_bug.cgi?id=37838

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:
Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r58179 r58183  
     12010-04-19  Dirk Pranke  <dpranke@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        new-run-webkit-tests: add a "--retry-failures" flag and a
     6        "--no-retry-failures" flag (the former is the default). Also, rename
     7        "--print-unexpected-results" and "--retry-unexpected-results" to
     8        "--print-last-failures" and "--retry-last-failures" because the
     9        retry flag was confusing. The new flag names aren't great, but
     10        hopefully they're less confusing.
     11
     12        https://bugs.webkit.org/show_bug.cgi?id=37838
     13
     14        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
     15
    1162010-04-22  Sam Weinig  <sam@webkit.org>
    217
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

    r58128 r58183  
    205205    DEFAULT_TEST_TIMEOUT_MS = 6 * 1000
    206206
    207     NUM_RETRY_ON_UNEXPECTED_FAILURE = 1
    208 
    209207    def __init__(self, port, options, meter):
    210208        """Initialize test runner data structures.
     
    237235        self._current_test_number = 0
    238236
    239         self._retries = 0
     237        self._retrying = False
    240238
    241239        # Hack for dumping threads on the bots
     
    718716        failures = self._get_failures(result_summary, include_crashes=False)
    719717        retry_summary = result_summary
    720         while (self._retries < self.NUM_RETRY_ON_UNEXPECTED_FAILURE and
    721                len(failures)):
     718        while (len(failures) and self._options.retry_failures and
     719            not self._retrying):
    722720            _log.info('')
    723             _log.info("Retrying %d unexpected failure(s)" % len(failures))
     721            _log.info("Retrying %d unexpected failure(s) ..." % len(failures))
    724722            _log.info('')
    725             self._retries += 1
     723            self._retrying = True
    726724            retry_summary = ResultSummary(self._expectations, failures.keys())
    727725            self._run_tests(failures.keys(), retry_summary)
     
    836834            result_summary.unexpected) / result_summary.total
    837835        action = "Testing"
    838         if self._retries > 0:
     836        if self._retrying:
    839837            action = "Retrying"
    840838        self._meter.progress("%s (%d%%): %d ran as expected, %d didn't,"
     
    15451543
    15461544    last_unexpected_results = []
    1547     if options.print_unexpected_results or options.retry_unexpected_results:
     1545    if options.print_last_failures or options.retest_last_failures:
    15481546        unexpected_results_filename = os.path.join(
    15491547           options.results_directory, "unexpected_results.json")
     
    15511549            results = simplejson.load(file)
    15521550        last_unexpected_results = results['tests'].keys()
    1553         if options.print_unexpected_results:
     1551        if options.print_last_failures:
    15541552            print "\n".join(last_unexpected_results) + "\n"
    15551553            return 0
     
    18551853        # FIXME: consider: --iterations n
    18561854        #      Number of times to run the set of tests (e.g. ABCABCABC)
    1857         optparse.make_option("--print-unexpected-results", action="store_true",
    1858             default=False, help="print the tests in the last run that "
    1859             "had unexpected results."),
    1860         optparse.make_option("--retry-unexpected-results", action="store_true",
    1861             default=False, help="re-try the tests in the last run that "
    1862             "had unexpected results."),
     1855        optparse.make_option("--print-last-failures", action="store_true",
     1856            default=False, help="Print the tests in the last run that "
     1857            "had unexpected failures (or passes)."),
     1858        optparse.make_option("--retest-last-failures", action="store_true",
     1859            default=False, help="re-test the tests in the last run that "
     1860            "had unexpected failures (or passes)."),
     1861        optparse.make_option("--retry-failures", action="store_true",
     1862            default=True,
     1863            help="Re-try any tests that produce unexpected results (default)"),
     1864        optparse.make_option("--no-retry-failures", action="store_false",
     1865            dest="retry_failures",
     1866            help="Don't re-try any tests that produce unexpected results."),
    18631867    ]
    18641868
Note: See TracChangeset for help on using the changeset viewer.