Changeset 160165 in webkit
- Timestamp:
- Dec 5, 2013, 2:32:13 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 9 edited
-
ChangeLog (modified) (1 diff)
-
Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py (modified) (1 diff)
-
Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py (modified) (2 diffs)
-
Scripts/webkitpy/layout_tests/controllers/manager.py (modified) (1 diff)
-
Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py (modified) (1 diff)
-
Scripts/webkitpy/layout_tests/models/test_expectations.py (modified) (1 diff)
-
Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py (modified) (7 diffs)
-
Scripts/webkitpy/layout_tests/models/test_run_results.py (modified) (5 diffs)
-
Scripts/webkitpy/tool/commands/rebaseline.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r160156 r160165 1 2013-12-05 Dániel Bátyai <Batyai.Daniel@stud.u-szeged.hu> 2 3 Remove certain methods from TestExpectations and use TestExpectationsModel instead of them 4 https://bugs.webkit.org/show_bug.cgi?id=125218 5 6 Reviewed by Ryosuke Niwa. 7 8 * Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py: 9 (LayoutTestFinder.skip_tests): 10 * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py: 11 (LayoutTestRunner.run_tests): 12 (LayoutTestRunner._update_summary_with_result): 13 * Scripts/webkitpy/layout_tests/controllers/manager.py: 14 (Manager._test_is_slow): 15 * Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py: 16 (JSONLayoutResultsGenerator._insert_failure_summaries): 17 * Scripts/webkitpy/layout_tests/models/test_expectations.py: 18 (TestExpectations.get_rebaselining_failures): 19 * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py: 20 (assert_exp): 21 (MiscTests.test_multiple_results): 22 (MiscTests.test_category_expectations): 23 (MiscTests.test_get_modifiers): 24 (MiscTests.test_get_expectations_string): 25 (MiscTests.test_expectation_to_string): 26 (MiscTests.test_get_test_set): 27 (MiscTests.test_more_specific_override_resets_skip): 28 (SkippedTests.check): 29 * Scripts/webkitpy/layout_tests/models/test_run_results.py: 30 (TestRunResults.__init__): 31 (summarize_results): 32 * Scripts/webkitpy/tool/commands/rebaseline.py: 33 (RebaselineExpectations._tests_to_rebaseline): 34 1 35 2013-12-04 Ryosuke Niwa <rniwa@webkit.org> 2 36 -
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py
r135653 r160165 97 97 all_tests = set(all_tests_list) 98 98 99 tests_to_skip = expectations. get_tests_with_result_type(test_expectations.SKIP)99 tests_to_skip = expectations.model().get_tests_with_result_type(test_expectations.SKIP) 100 100 if self._options.skip_failing_tests: 101 tests_to_skip.update(expectations. get_tests_with_result_type(test_expectations.FAIL))102 tests_to_skip.update(expectations. get_tests_with_result_type(test_expectations.FLAKY))101 tests_to_skip.update(expectations.model().get_tests_with_result_type(test_expectations.FAIL)) 102 tests_to_skip.update(expectations.model().get_tests_with_result_type(test_expectations.FLAKY)) 103 103 104 104 if self._options.skipped == 'only': -
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py
r151201 r160165 97 97 98 98 if not retrying: 99 self._printer.print_expected(run_results, self._expectations. get_tests_with_result_type)99 self._printer.print_expected(run_results, self._expectations.model().get_tests_with_result_type) 100 100 101 101 for test_name in set(tests_to_skip): … … 189 189 else: 190 190 expected = self._expectations.matches_an_expected_result(result.test_name, result.type, self._options.pixel_tests or result.reftest_type) 191 exp_str = self._expectations. get_expectations_string(result.test_name)192 got_str = self._expectations. expectation_to_string(result.type)191 exp_str = self._expectations.model().get_expectations_string(result.test_name) 192 got_str = self._expectations.model().expectation_to_string(result.type) 193 193 194 194 run_results.add(result, expected, self._test_is_slow(result.test_name)) -
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
r159453 r160165 138 138 139 139 def _test_is_slow(self, test_file): 140 return self._expectations. has_modifier(test_file, test_expectations.SLOW)140 return self._expectations.model().has_modifier(test_file, test_expectations.SLOW) 141 141 142 142 def needs_servers(self, test_names): -
trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py
r148353 r160165 133 133 self.FIXABLE) 134 134 self._insert_item_into_raw_list(results_for_builder, 135 len(self._expectations. get_tests_with_timeline(135 len(self._expectations.model().get_tests_with_timeline( 136 136 test_expectations.NOW)), self.ALL_FIXABLE_COUNT) 137 137 self._insert_item_into_raw_list(results_for_builder, -
trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
r158373 r160165 885 885 return self._model.get_test_set(REBASELINE) 886 886 887 # FIXME: Change the callsites to use TestExpectationsModel and remove.888 def get_expectations(self, test):889 return self._model.get_expectations(test)890 891 # FIXME: Change the callsites to use TestExpectationsModel and remove.892 def has_modifier(self, test, modifier):893 return self._model.has_modifier(test, modifier)894 895 # FIXME: Change the callsites to use TestExpectationsModel and remove.896 def get_tests_with_result_type(self, result_type):897 return self._model.get_tests_with_result_type(result_type)898 899 # FIXME: Change the callsites to use TestExpectationsModel and remove.900 def get_test_set(self, modifier, expectation=None, include_skips=True):901 return self._model.get_test_set(modifier, expectation, include_skips)902 903 # FIXME: Change the callsites to use TestExpectationsModel and remove.904 def get_modifiers(self, test):905 return self._model.get_modifiers(test)906 907 # FIXME: Change the callsites to use TestExpectationsModel and remove.908 def get_tests_with_timeline(self, timeline):909 return self._model.get_tests_with_timeline(timeline)910 911 def get_expectations_string(self, test):912 return self._model.get_expectations_string(test)913 914 def expectation_to_string(self, expectation):915 return self._model.expectation_to_string(expectation)916 917 887 def matches_an_expected_result(self, test, result, pixel_tests_are_enabled): 918 888 expected_results = self._model.get_expectations(test) -
trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
r159998 r160165 81 81 82 82 def assert_exp(self, test, result): 83 self.assertEqual(self._exp. get_expectations(test),83 self.assertEqual(self._exp.model().get_expectations(test), 84 84 set([result])) 85 85 … … 100 100 def test_multiple_results(self): 101 101 self.parse_exp('Bug(x) failures/expected/text.html [ Crash Failure ]') 102 self.assertEqual(self._exp. get_expectations(102 self.assertEqual(self._exp.model().get_expectations( 103 103 'failures/expected/text.html'), 104 104 set([FAIL, CRASH])) … … 138 138 test_name = 'failures/expected/unknown-test.html' 139 139 unknown_test = test_name 140 self.assertRaises(KeyError, self._exp. get_expectations,140 self.assertRaises(KeyError, self._exp.model().get_expectations, 141 141 unknown_test) 142 142 self.assert_exp('failures/expected/crash.html', PASS) … … 144 144 def test_get_modifiers(self): 145 145 self.parse_exp(self.get_basic_expectations()) 146 self.assertEqual(self._exp. get_modifiers('passes/text.html'), [])146 self.assertEqual(self._exp.model().get_modifiers('passes/text.html'), []) 147 147 148 148 def test_get_expectations_string(self): 149 149 self.parse_exp(self.get_basic_expectations()) 150 self.assertEqual(self._exp. get_expectations_string('failures/expected/text.html'), 'FAIL')150 self.assertEqual(self._exp.model().get_expectations_string('failures/expected/text.html'), 'FAIL') 151 151 152 152 def test_expectation_to_string(self): 153 153 # Normal cases are handled by other tests. 154 154 self.parse_exp(self.get_basic_expectations()) 155 self.assertRaises(ValueError, self._exp. expectation_to_string,155 self.assertRaises(ValueError, self._exp.model().expectation_to_string, 156 156 -1) 157 157 … … 159 159 # Handle some corner cases for this routine not covered by other tests. 160 160 self.parse_exp(self.get_basic_expectations()) 161 s = self._exp. get_test_set(WONTFIX)161 s = self._exp.model().get_test_set(WONTFIX) 162 162 self.assertEqual(s, 163 163 set(['failures/expected/crash.html', … … 237 237 self.assertFalse(self._port._filesystem.join(self._port.layout_tests_dir(), 238 238 'failures/expected/text.html') in 239 self._exp. get_tests_with_result_type(SKIP))239 self._exp.model().get_tests_with_result_type(SKIP)) 240 240 241 241 … … 254 254 255 255 # Check that the expectation is for BUG_DUMMY SKIP : ... [ Pass ] 256 self.assertEqual(exp. get_modifiers('failures/expected/text.html'),256 self.assertEqual(exp.model().get_modifiers('failures/expected/text.html'), 257 257 [TestExpectationParser.DUMMY_BUG_MODIFIER, TestExpectationParser.SKIP_MODIFIER, TestExpectationParser.WONTFIX_MODIFIER]) 258 self.assertEqual(exp. get_expectations('failures/expected/text.html'), set([PASS]))258 self.assertEqual(exp.model().get_expectations('failures/expected/text.html'), set([PASS])) 259 259 260 260 def test_skipped_tests_work(self): -
trunk/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py
r159847 r160165 58 58 self.tests_by_expectation[expectation] = set() 59 59 for timeline in test_expectations.TestExpectations.TIMELINES.values(): 60 self.tests_by_timeline[timeline] = expectations. get_tests_with_timeline(timeline)60 self.tests_by_timeline[timeline] = expectations.model().get_tests_with_timeline(timeline) 61 61 self.slow_tests = set() 62 62 self.interrupted = False … … 155 155 # whether or not it crashed when we retried it (if we retried it), 156 156 # and always consider the result not flaky. 157 expected = expectations. get_expectations_string(test_name)157 expected = expectations.model().get_expectations_string(test_name) 158 158 result_type = result.type 159 159 actual = [keywords[result_type]] … … 169 169 test_dict.update(reftest_type=list(result.reftest_type)) 170 170 171 if expectations. has_modifier(test_name, test_expectations.WONTFIX):171 if expectations.model().has_modifier(test_name, test_expectations.WONTFIX): 172 172 test_dict['wontfix'] = True 173 173 … … 185 185 elif test_name in initial_results.unexpected_results_by_name: 186 186 if retry_results and test_name not in retry_results.unexpected_results_by_name: 187 actual.extend(expectations. get_expectations_string(test_name).split(" "))187 actual.extend(expectations.model().get_expectations_string(test_name).split(" ")) 188 188 num_flaky += 1 189 189 elif retry_results: … … 205 205 test_dict['time'] = round(1000 * result.test_run_time) 206 206 # FIXME: Fix get_modifiers to return modifiers in new format. 207 test_dict['modifiers'] = ' '.join(expectations. get_modifiers(test_name)).replace('BUGWK', 'webkit.org/b/')207 test_dict['modifiers'] = ' '.join(expectations.model().get_modifiers(test_name)).replace('BUGWK', 'webkit.org/b/') 208 208 209 209 test_dict.update(_interpret_test_failures(result.failures)) -
trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
r159595 r160165 325 325 expectations = TestExpectations(port, include_overrides=True) 326 326 for test in expectations.get_rebaselining_failures(): 327 tests_to_rebaseline[test] = TestExpectations.suffixes_for_expectations(expectations. get_expectations(test))327 tests_to_rebaseline[test] = TestExpectations.suffixes_for_expectations(expectations.model().get_expectations(test)) 328 328 return tests_to_rebaseline 329 329
Note:
See TracChangeset
for help on using the changeset viewer.