Diff
Modified: trunk/Tools/ChangeLog (136579 => 136580)
--- trunk/Tools/ChangeLog 2012-12-04 22:50:24 UTC (rev 136579)
+++ trunk/Tools/ChangeLog 2012-12-04 22:51:45 UTC (rev 136580)
@@ -1,5 +1,32 @@
2012-12-04 Dirk Pranke <[email protected]>
+ nrwt: result summaries should not require a list of tests to skip
+ https://bugs.webkit.org/show_bug.cgi?id=103951
+
+ Reviewed by Ryosuke Niwa.
+
+ We shouldn't really be passing a list of tests to skip to the
+ ResultSummary objects; they should be handled like any other
+ test result as much as possible.
+
+ * 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/models/test_expectations.py:
+ (TestExpectations):
+ * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
+ (Testprinter.get_result_summary):
+
+2012-12-04 Dirk Pranke <[email protected]>
+
nrwt: derive per-thread, per-worker stats from result summaries
https://bugs.webkit.org/show_bug.cgi?id=103943
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py (136579 => 136580)
--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py 2012-12-04 22:50:24 UTC (rev 136579)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py 2012-12-04 22:51:45 UTC (rev 136580)
@@ -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, set())
+ return ResultSummary(TestExpectations(runner._port, tests), tests, 1)
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, set())
+ result_summary = ResultSummary(expectations, [test], 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, set())
+ result_summary = ResultSummary(expectations, [test], 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 (136579 => 136580)
--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py 2012-12-04 22:50:24 UTC (rev 136579)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py 2012-12-04 22:51:45 UTC (rev 136580)
@@ -325,7 +325,12 @@
self._test_names = self._test_names * self._options.iterations
iterations = self._options.repeat_each * self._options.iterations
- return ResultSummary(self._expectations, set(self._test_names), iterations, tests_to_skip)
+ summary = ResultSummary(self._expectations, set(self._test_names), iterations)
+ for test_name in set(tests_to_skip):
+ result = test_results.TestResult(test_name)
+ result.type = test_expectations.SKIP
+ summary.add(result, expected=True, test_is_slow=self._test_is_slow(test_name))
+ return summary
def _test_input_for_file(self, test_file):
return TestInput(test_file,
@@ -413,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, set()), 1, retrying=True)
+ retry_summary = self._run_tests(failures, ResultSummary(self._expectations, failures, 1), 1, retrying=True)
finally:
# If we are ctrl-c'ed; we still want to try and print the results we got, and clean up,
# but we don't want to upload anything.
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py (136579 => 136580)
--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py 2012-12-04 22:50:24 UTC (rev 136579)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py 2012-12-04 22:51:45 UTC (rev 136580)
@@ -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, set())
+ rs = ResultSummary(expectations, tests, 1)
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, set()), expectations
+ return test_names, ResultSummary(expectations, test_names, 1), 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 (136579 => 136580)
--- trunk/Tools/Scripts/webkitpy/layout_tests/models/result_summary.py 2012-12-04 22:50:24 UTC (rev 136579)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/models/result_summary.py 2012-12-04 22:51:45 UTC (rev 136580)
@@ -31,7 +31,7 @@
class ResultSummary(object):
- def __init__(self, expectations, test_files, iterations, expected_skips):
+ def __init__(self, expectations, test_files, iterations):
self.total = len(test_files) * iterations
self.remaining = self.total
self.expectations = expectations
@@ -48,8 +48,6 @@
self.failures = {}
self.total_failures = 0
self.expected_skips = 0
- self.total_tests_by_expectation[SKIP] = len(expected_skips)
- self.tests_by_expectation[SKIP] = expected_skips
for expectation in TestExpectations.EXPECTATIONS.values():
self.tests_by_expectation[expectation] = set()
self.total_tests_by_expectation[expectation] = 0
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py (136579 => 136580)
--- trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py 2012-12-04 22:50:24 UTC (rev 136579)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py 2012-12-04 22:51:45 UTC (rev 136580)
@@ -754,7 +754,8 @@
'text': TEXT,
'timeout': TIMEOUT,
'crash': CRASH,
- 'missing': MISSING}
+ 'missing': MISSING,
+ 'skip': SKIP}
# (aggregated by category, pass/fail/skip, type)
EXPECTATION_DESCRIPTIONS = {SKIP: 'skipped',
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py (136579 => 136580)
--- trunk/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py 2012-12-04 22:50:24 UTC (rev 136579)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py 2012-12-04 22:51:45 UTC (rev 136580)
@@ -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, set())
+ rs = result_summary.ResultSummary(expectations, test_names, 1)
return test_names, rs, expectations
def test_configure_and_cleanup(self):