Diff
Modified: trunk/Tools/ChangeLog (136581 => 136582)
--- trunk/Tools/ChangeLog 2012-12-04 22:54:01 UTC (rev 136581)
+++ trunk/Tools/ChangeLog 2012-12-04 22:55:56 UTC (rev 136582)
@@ -1,5 +1,31 @@
2012-12-04 Dirk Pranke <dpra...@chromium.org>
+ nrwt: store only the total number of tests in the result summary
+ https://bugs.webkit.org/show_bug.cgi?id=103963
+
+ Reviewed by Ryosuke Niwa.
+
+ The result summary only needs the total number of tests that will
+ be run (including repetitions) in order to provide the correct stats;
+ it doesn't actually need to know how many unique tests there are, or
+ or how many repetitions there are.
+
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
+ (LayoutTestRunnerTests._result_summary):
+ (LayoutTestRunnerTests.test_update_summary_with_result):
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager._prepare_lists):
+ (Manager.run):
+ * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
+ (ManagerTest.test_look_for_new_crash_logs):
+ (ResultSummaryTest.get_result_summary):
+ * Scripts/webkitpy/layout_tests/models/result_summary.py:
+ (ResultSummary.__init__):
+ * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
+ (Testprinter.get_result_summary):
+
+2012-12-04 Dirk Pranke <dpra...@chromium.org>
+
nrwt: do less work when ctrl-c'ed
https://bugs.webkit.org/show_bug.cgi?id=103961
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py (136581 => 136582)
--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py 2012-12-04 22:54:01 UTC (rev 136581)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py 2012-12-04 22:55:56 UTC (rev 136582)
@@ -99,7 +99,7 @@
return LockCheckingRunner(port, options, FakePrinter(), self, True)
def _result_summary(self, runner, tests):
- return ResultSummary(TestExpectations(runner._port, tests), tests, 1)
+ return ResultSummary(TestExpectations(runner._port, tests), len(tests))
def _run_tests(self, runner, tests):
test_inputs = [TestInput(test, 6000) for test in tests]
@@ -152,13 +152,13 @@
expectations = TestExpectations(runner._port, tests=[test])
runner._expectations = expectations
- result_summary = ResultSummary(expectations, [test], 1)
+ result_summary = ResultSummary(expectations, 1)
result = TestResult(test_name=test, failures=[test_failures.FailureReftestMismatchDidNotOccur()], reftest_type=['!='])
runner._update_summary_with_result(result_summary, result)
self.assertEqual(1, result_summary.expected)
self.assertEqual(0, result_summary.unexpected)
- result_summary = ResultSummary(expectations, [test], 1)
+ result_summary = ResultSummary(expectations, 1)
result = TestResult(test_name=test, failures=[], reftest_type=['=='])
runner._update_summary_with_result(result_summary, result)
self.assertEqual(0, result_summary.expected)
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py (136581 => 136582)
--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py 2012-12-04 22:54:01 UTC (rev 136581)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py 2012-12-04 22:55:56 UTC (rev 136582)
@@ -326,8 +326,7 @@
if self._options.iterations > 1:
self._test_names = self._test_names * self._options.iterations
- iterations = self._options.repeat_each * self._options.iterations
- summary = ResultSummary(self._expectations, set(self._test_names), iterations)
+ summary = ResultSummary(self._expectations, len(self._test_names))
for test_name in set(tests_to_skip):
result = test_results.TestResult(test_name)
result.type = test_expectations.SKIP
@@ -419,7 +418,7 @@
_log.info('')
_log.info("Retrying %d unexpected failure(s) ..." % len(failures))
_log.info('')
- retry_summary = self._run_tests(failures, ResultSummary(self._expectations, failures, 1), 1, retrying=True)
+ retry_summary = self._run_tests(failures, ResultSummary(self._expectations, len(failures)), 1, retrying=True)
else:
retry_summary = None
finally:
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py (136581 => 136582)
--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py 2012-12-04 22:54:01 UTC (rev 136581)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py 2012-12-04 22:55:56 UTC (rev 136582)
@@ -90,7 +90,7 @@
port = host.port_factory.get('test-mac-leopard')
tests = ['failures/expected/crash.html']
expectations = test_expectations.TestExpectations(port, tests)
- rs = ResultSummary(expectations, tests, 1)
+ rs = ResultSummary(expectations, len(tests))
manager = get_manager_with_tests(tests)
manager._look_for_new_crash_logs(rs, time.time())
@@ -141,7 +141,7 @@
def get_result_summary(self, port, test_names, expectations_str):
port.expectations_dict = lambda: {'': expectations_str}
expectations = test_expectations.TestExpectations(port, test_names)
- return test_names, ResultSummary(expectations, test_names, 1), expectations
+ return test_names, ResultSummary(expectations, len(test_names)), expectations
# FIXME: Use this to test more of summarize_results. This was moved from printing_unittest.py.
def summarized_results(self, port, expected, passing, flaky, extra_tests=[], extra_expectations=None):
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/models/result_summary.py (136581 => 136582)
--- trunk/Tools/Scripts/webkitpy/layout_tests/models/result_summary.py 2012-12-04 22:54:01 UTC (rev 136581)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/models/result_summary.py 2012-12-04 22:55:56 UTC (rev 136582)
@@ -31,8 +31,8 @@
class ResultSummary(object):
- def __init__(self, expectations, test_files, iterations):
- self.total = len(test_files) * iterations
+ def __init__(self, expectations, num_tests):
+ self.total = num_tests
self.remaining = self.total
self.expectations = expectations
self.expected = 0
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py (136581 => 136582)
--- trunk/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py 2012-12-04 22:54:01 UTC (rev 136581)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py 2012-12-04 22:55:56 UTC (rev 136582)
@@ -99,7 +99,7 @@
port.test_expectations_overrides = lambda: None
expectations = test_expectations.TestExpectations(self._port, test_names)
- rs = result_summary.ResultSummary(expectations, test_names, 1)
+ rs = result_summary.ResultSummary(expectations, len(test_names))
return test_names, rs, expectations
def test_configure_and_cleanup(self):