Diff
Modified: trunk/Tools/ChangeLog (99460 => 99461)
--- trunk/Tools/ChangeLog 2011-11-07 20:40:24 UTC (rev 99460)
+++ trunk/Tools/ChangeLog 2011-11-07 20:42:33 UTC (rev 99461)
@@ -1,3 +1,14 @@
+2011-11-07 Eric Seidel <[email protected]>
+
+ new-run-webkit-tests: support --repeat-each feature from old-run-webkit-tests
+ https://bugs.webkit.org/show_bug.cgi?id=62199
+
+ Reviewed by Dirk Pranke.
+
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+
2011-11-07 Fady Samuel <[email protected]>
[Chromium] Rename WebView::scalePage to WebView::setPageScaleFactor to match WebCore
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py (99460 => 99461)
--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py 2011-11-07 20:40:24 UTC (rev 99460)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py 2011-11-07 20:42:33 UTC (rev 99461)
@@ -504,6 +504,16 @@
skipped = self._split_into_chunks_if_necessary(skipped)
+ # FIXME: It's unclear how --repeat-each and --iterations should interact with chunks?
+ if self._options.repeat_each:
+ list_with_repetitions = []
+ for test in self._test_files_list:
+ list_with_repetitions += ([test] * self._options.repeat_each)
+ self._test_files_list = list_with_repetitions
+
+ if self._options.iterations:
+ self._test_files_list = self._test_files_list * self._options.iterations
+
result_summary = ResultSummary(self._expectations, self._test_files | skipped)
self._print_expected_results_of_type(result_summary, test_expectations.PASS, "passes")
self._print_expected_results_of_type(result_summary, test_expectations.FAIL, "failures")
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py (99460 => 99461)
--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py 2011-11-07 20:40:24 UTC (rev 99460)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py 2011-11-07 20:42:33 UTC (rev 99461)
@@ -387,8 +387,8 @@
optparse.make_option("--exit-after-n-crashes-or-timeouts", type="int",
default=20, help="Exit after the first N crashes instead of "
"running all tests"),
- # FIXME: consider: --iterations n
- # Number of times to run the set of tests (e.g. ABCABCABC)
+ optparse.make_option("--iterations", type="int", help="Number of times to run the set of tests (e.g. ABCABCABC)"),
+ optparse.make_option("--repeat-each", type="int", help="Number of times to run each test (e.g. AAABBBCCC)"),
optparse.make_option("--retry-failures", action=""
default=True,
help="Re-try any tests that produce unexpected results (default)"),
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py (99460 => 99461)
--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py 2011-11-07 20:40:24 UTC (rev 99460)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py 2011-11-07 20:42:33 UTC (rev 99461)
@@ -326,6 +326,16 @@
def test_threaded(self):
self.assertTrue(passing_run(['--threaded']))
+ def test_repeat_each(self):
+ tests_to_run = ['passes/image.html', 'passes/text.html']
+ tests_run = get_tests_run(['--repeat-each', '2'] + tests_to_run, tests_included=True, flatten_batches=True)
+ self.assertEquals(tests_run, ['passes/image.html', 'passes/image.html', 'passes/text.html', 'passes/text.html'])
+
+ def test_iterations(self):
+ tests_to_run = ['passes/image.html', 'passes/text.html']
+ tests_run = get_tests_run(['--iterations', '2'] + tests_to_run, tests_included=True, flatten_batches=True)
+ self.assertEquals(tests_run, ['passes/image.html', 'passes/text.html', 'passes/image.html', 'passes/text.html'])
+
def test_run_chunk(self):
# Test that we actually select the right chunk
all_tests_run = get_tests_run(flatten_batches=True)