Changeset 235771 in webkit
- Timestamp:
- Sep 6, 2018 5:24:51 PM (6 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r235769 r235771 1 2018-09-06 Simon Fraser <simon.fraser@apple.com> 2 3 Log when leak detection changes the test result 4 https://bugs.webkit.org/show_bug.cgi?id=189293 5 6 Reviewed by Jon Lee. 7 8 When you have an "Leak" expectation in TestExpectations, it's confusing to see a test unexpectedly pass, 9 but then show up as an expected fail at the end (because leak detection happens at the end of a shard). 10 So log when leak detection changes a test result. 11 12 * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py: 13 (LayoutTestRunner._annotate_results_with_additional_failures): 14 * Scripts/webkitpy/layout_tests/models/test_expectations.py: 15 (TestExpectations): 16 1 17 2018-09-06 Wenson Hsieh <wenson_hsieh@apple.com> 2 18 -
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py
r235764 r235771 203 203 was_expected = self._expectations.matches_an_expected_result(new_result.test_name, existing_result.type, expectations) 204 204 now_expected = self._expectations.matches_an_expected_result(new_result.test_name, new_result.type, expectations) 205 if was_expected != now_expected: 206 # When annotation is not just about leaks, this logging should be changed. 207 _log.warning(' %s -> changed by leak detection from a %s (%s) to a %s (%s)' % (new_result.test_name, 208 TestExpectations.EXPECTATION_DESCRIPTION[existing_result.type], 'expected' if was_expected else 'unexpected', 209 TestExpectations.EXPECTATION_DESCRIPTION[new_result.type], 'expected' if now_expected else 'unexpected')) 205 210 run_results.change_result_to_failure(existing_result, new_result, was_expected, now_expected) 206 211 -
trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
r235764 r235771 816 816 'skip': SKIP} 817 817 818 # Singulars 819 EXPECTATION_DESCRIPTION = {SKIP: 'skipped', 820 PASS: 'pass', 821 FAIL: 'failure', 822 IMAGE: 'image-only failure', 823 TEXT: 'text-only failure', 824 IMAGE_PLUS_TEXT: 'image and text failure', 825 AUDIO: 'audio failure', 826 CRASH: 'crash', 827 TIMEOUT: 'timeout', 828 MISSING: 'missing', 829 LEAK: 'leak'} 830 818 831 # (aggregated by category, pass/fail/skip, type) 819 832 EXPECTATION_DESCRIPTIONS = {SKIP: 'skipped', -
trunk/Tools/Scripts/webkitpy/layout_tests/views/printing.py
r204680 r235771 322 322 test_name = result.test_name 323 323 324 result_message = self._result_message(result.type, result.failures, expected, self._options.verbose)324 result_message = self._result_message(result.type, result.failures, expected, exp_str, self._options.verbose) 325 325 326 326 if self._options.details: … … 341 341 self._running_tests.remove(test_name) 342 342 343 def _result_message(self, result_type, failures, expected, verbose): 344 exp_string = ' unexpectedly' if not expected else '' 343 def _result_message(self, result_type, failures, expected, exp_str, verbose): 344 exp_string = '' 345 if not expected: 346 exp_string = ' (leak detection is pending)' if 'LEAK' in exp_str else ' unexpectedly' 347 345 348 if result_type == test_expectations.PASS: 346 349 return ' passed%s' % exp_string
Note: See TracChangeset
for help on using the changeset viewer.