Changeset 106591 in webkit
- Timestamp:
- Feb 2, 2012 1:55:08 PM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r106584 r106591 1 2012-02-02 Dirk Pranke <dpranke@chromium.org> 2 3 nrwt shouldn't blow up when there are errors in test_expectations.txt 4 https://bugs.webkit.org/show_bug.cgi?id=73603 5 6 Reviewed by Ojan Vafai. 7 8 This change removes the distinction between 'errors' and 'warnings' 9 in the test expectations parser. Now, any problem is a 10 'warning', and if we are linting the file, warnings become fatal (errors). 11 12 This will allow a normal run-webkit-tests run to proceed even if 13 there are bad lines. 14 15 * Scripts/webkitpy/layout_tests/models/test_expectations.py: 16 (ParseError.__init__): 17 (ParseError.__str__): 18 (ParseError.__repr__): 19 (TestExpectationSerializer.to_string): 20 (TestExpectationParser._parse_modifiers): 21 (TestExpectationParser._parse_expectations): 22 (TestExpectationParser._check_modifiers_against_expectations): 23 (TestExpectationParser._tokenize): 24 (TestExpectationLine.__init__): 25 (TestExpectationLine.is_invalid): 26 (TestExpectationsModel.add_expectation_line): 27 (TestExpectationsModel._already_seen_better_match): 28 (TestExpectations.__init__): 29 (TestExpectations._report_warnings): 30 (TestExpectations.remove_rebaselined_tests.without_rebaseline_modifier): 31 * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py: 32 (assert_bad_expectations): 33 (test_parse_warning): 34 (test_overrides__duplicate): 35 (ExpectationSyntaxTests.test_missing_expectation): 36 (ExpectationSyntaxTests.test_missing_colon): 37 (ExpectationSyntaxTests.test_too_many_colons): 38 (ExpectationSyntaxTests.test_too_many_equals_signs): 39 (ExpectationSyntaxTests.test_unrecognized_expectation): 40 (SemanticTests.test_bug_format): 41 (SemanticTests.test_bad_bugid): 42 (SemanticTests.test_slow_and_timeout): 43 (test_ambiguous): 44 (test_more_modifiers): 45 (test_order_in_file): 46 (test_macro_overrides): 47 (RebaseliningTest.assertRemove): 48 (TestExpectationParserTests.test_tokenize_blank): 49 (TestExpectationParserTests.test_tokenize_missing_colon): 50 (TestExpectationParserTests.test_tokenize_extra_colon): 51 (TestExpectationParserTests.test_tokenize_empty_comment): 52 (TestExpectationParserTests.test_tokenize_comment): 53 (TestExpectationParserTests.test_tokenize_missing_equal): 54 (TestExpectationParserTests.test_tokenize_extra_equal): 55 (TestExpectationParserTests.test_tokenize_valid): 56 (TestExpectationParserTests.test_tokenize_valid_with_comment): 57 (TestExpectationParserTests.test_tokenize_valid_with_multiple_modifiers): 58 (TestExpectationSerializerTests.test_unparsed_to_string): 59 * Scripts/webkitpy/layout_tests/run_webkit_tests.py: 60 (lint): 61 * Scripts/webkitpy/style/checkers/test_expectations.py: 62 (TestExpectationsChecker.check_test_expectations): 63 1 64 2012-02-02 Sheriff Bot <webkit.review.bot@gmail.com> 2 65 -
trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
r106293 r106591 109 109 110 110 class ParseError(Exception): 111 def __init__(self, fatal, errors): 112 self.fatal = fatal 113 self.errors = errors 111 def __init__(self, warnings): 112 self.warnings = warnings 114 113 115 114 def __str__(self): 116 return '\n'.join(map(str, self. errors))115 return '\n'.join(map(str, self.warnings)) 117 116 118 117 def __repr__(self): 119 return 'ParseError( fatal=%s, errors=%s)' % (self.fatal, self.errors)118 return 'ParseError(warnings=%s)' % self.warnings 120 119 121 120 … … 127 126 128 127 def to_string(self, expectation_line): 129 if expectation_line.is_ malformed():128 if expectation_line.is_invalid(): 130 129 return expectation_line.original_string or '' 131 130 … … 249 248 has_bugid = True 250 249 if re.match(self.BUG_MODIFIER_REGEX, modifier): 251 expectation_line. errors.append('BUG\d+ is not allowed, must be one of BUGCR\d+, BUGWK\d+, BUGV8_\d+, or a non-numeric bug identifier.')250 expectation_line.warnings.append('BUG\d+ is not allowed, must be one of BUGCR\d+, BUGWK\d+, BUGV8_\d+, or a non-numeric bug identifier.') 252 251 else: 253 252 expectation_line.parsed_bug_modifiers.append(modifier) … … 259 258 260 259 if self._allow_rebaseline_modifier and self.REBASELINE_MODIFIER in expectation_line.modifiers: 261 expectation_line. errors.append('REBASELINE should only be used for running rebaseline.py. Cannot be checked in.')262 263 expectation_line.matching_configurations = self._test_configuration_converter.to_config_set(parsed_specifiers, expectation_line. errors)260 expectation_line.warnings.append('REBASELINE should only be used for running rebaseline.py. Cannot be checked in.') 261 262 expectation_line.matching_configurations = self._test_configuration_converter.to_config_set(parsed_specifiers, expectation_line.warnings) 264 263 265 264 def _parse_expectations(self, expectation_line): … … 268 267 expectation = TestExpectations.expectation_from_string(part) 269 268 if expectation is None: # Careful, PASS is currently 0. 270 expectation_line. errors.append('Unsupported expectation: %s' % part)269 expectation_line.warnings.append('Unsupported expectation: %s' % part) 271 270 continue 272 271 result.add(expectation) … … 275 274 def _check_modifiers_against_expectations(self, expectation_line): 276 275 if self.SLOW_MODIFIER in expectation_line.modifiers and self.TIMEOUT_EXPECTATION in expectation_line.expectations: 277 expectation_line. errors.append('A test can not be both SLOW and TIMEOUT. If it times out indefinitely, then it should be just TIMEOUT.')276 expectation_line.warnings.append('A test can not be both SLOW and TIMEOUT. If it times out indefinitely, then it should be just TIMEOUT.') 278 277 279 278 def _check_path_does_not_exist(self, expectation_line): … … 339 338 parts = remaining_string.split(':') 340 339 if len(parts) != 2: 341 expectation_line. errors.append("Missing a ':'" if len(parts) < 2 else "Extraneous ':'")340 expectation_line.warnings.append("Missing a ':'" if len(parts) < 2 else "Extraneous ':'") 342 341 else: 343 342 test_and_expectation = parts[1].split('=') 344 343 if len(test_and_expectation) != 2: 345 expectation_line. errors.append("Missing expectations" if len(test_and_expectation) < 2 else "Extraneous '='")346 347 if not expectation_line.is_ malformed():344 expectation_line.warnings.append("Missing expectations" if len(test_and_expectation) < 2 else "Extraneous '='") 345 346 if not expectation_line.is_invalid(): 348 347 expectation_line.modifiers = cls._split_space_separated(parts[0]) 349 348 expectation_line.name = test_and_expectation[0].strip() … … 386 385 self.comment = None 387 386 self.matching_tests = [] 388 self.errors = []389 387 self.warnings = [] 390 388 391 def is_malformed(self):392 return len(self.errors) > 0393 394 389 def is_invalid(self): 395 return self.is_malformed() orlen(self.warnings) > 0390 return len(self.warnings) > 0 396 391 397 392 def is_flaky(self): … … 477 472 478 473 def add_expectation_line(self, expectation_line, overrides_allowed): 479 """Returns a list of errors,encountered while matching modifiers."""474 """Returns a list of warnings encountered while matching modifiers.""" 480 475 481 476 if expectation_line.is_invalid(): … … 593 588 594 589 if prev_expectation_line.matching_configurations == expectation_line.matching_configurations: 595 expectation_line. errors.append('Duplicate or ambiguous %s.' % expectation_source)590 expectation_line.warnings.append('Duplicate or ambiguous %s.' % expectation_source) 596 591 return True 597 592 598 593 if prev_expectation_line.matching_configurations >= expectation_line.matching_configurations: 599 expectation_line. errors.append('More specific entry on line %d overrides line %d' % (expectation_line.line_number, prev_expectation_line.line_number))594 expectation_line.warnings.append('More specific entry on line %d overrides line %d' % (expectation_line.line_number, prev_expectation_line.line_number)) 600 595 # FIXME: return False if we want more specific to win. 601 596 return True 602 597 603 598 if prev_expectation_line.matching_configurations <= expectation_line.matching_configurations: 604 expectation_line. errors.append('More specific entry on line %d overrides line %d' % (prev_expectation_line.line_number, expectation_line.line_number))599 expectation_line.warnings.append('More specific entry on line %d overrides line %d' % (prev_expectation_line.line_number, expectation_line.line_number)) 605 600 return True 606 601 607 602 if prev_expectation_line.matching_configurations & expectation_line.matching_configurations: 608 expectation_line. errors.append('Entries on line %d and line %d match overlapping sets of configurations' % (prev_expectation_line.line_number, expectation_line.line_number))603 expectation_line.warnings.append('Entries on line %d and line %d match overlapping sets of configurations' % (prev_expectation_line.line_number, expectation_line.line_number)) 609 604 return True 610 605 … … 707 702 parsing the file (usually port.test_config(), 708 703 but may be different when linting or doing other things). 709 is_lint_mode: If True, just parse the expectations string710 looking for errors.704 is_lint_mode: If True, parse the expectations string and raise 705 an exception if warnings are encountered. 711 706 overrides: test expectations that are allowed to override any 712 707 entries in |expectations|. This is used by callers … … 732 727 733 728 self._has_warnings = False 734 self._report_ errors()729 self._report_warnings() 735 730 self._process_tests_without_expectations() 736 731 … … 799 794 return self._model.has_modifier(test, REBASELINE) 800 795 801 def _report_errors(self): 802 errors = [] 796 def _report_warnings(self): 803 797 warnings = [] 804 798 test_expectation_path = self._port.path_to_test_expectations_file() … … 806 800 test_expectation_path = self._port.host.filesystem.relpath(test_expectation_path, self._port.path_from_webkit_base()) 807 801 for expectation in self._expectations: 808 for error in expectation.errors:809 errors.append('%s:%d %s %s' % (test_expectation_path, expectation.line_number, error, expectation.name if expectation.expectations else expectation.original_string))810 802 for warning in expectation.warnings: 811 803 warnings.append('%s:%d %s %s' % (test_expectation_path, expectation.line_number, warning, expectation.name if expectation.expectations else expectation.original_string)) … … 814 806 warnings.append('%s%s' % (test_expectation_path, warning)) 815 807 816 if errors or warnings: 817 if errors: 818 raise ParseError(fatal=True, errors=sorted(errors + warnings)) 819 if warnings: 820 self._has_warnings = True 821 if self._is_lint_mode: 822 raise ParseError(fatal=False, errors=warnings) 808 if warnings: 809 self._has_warnings = True 810 if self._is_lint_mode: 811 raise ParseError(warnings) 823 812 824 813 def _process_tests_without_expectations(self): … … 834 823 """Returns a copy of the expectations with the tests removed.""" 835 824 def without_rebaseline_modifier(expectation): 836 return not (not expectation.is_ malformed() and expectation.name in except_these_tests and "rebaseline" in expectation.modifiers)825 return not (not expectation.is_invalid() and expectation.name in except_these_tests and "rebaseline" in expectation.modifiers) 837 826 838 827 return TestExpectationSerializer.list_to_string(filter(without_rebaseline_modifier, self._expectations)) -
trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
r106293 r106591 132 132 set([result])) 133 133 134 def assert_bad_expectations(self, expectations, overrides=None): 135 self.assertRaises(ParseError, self.parse_exp, expectations, is_lint_mode=True, overrides=overrides) 136 134 137 135 138 class BasicTests(Base): … … 193 196 self.assertEqual(s, set([])) 194 197 195 def test_parse_ error_fatal(self):198 def test_parse_warning(self): 196 199 try: 197 200 self.parse_exp("""FOO : failures/expected/text.html = TEXT 198 SKIP : failures/expected/image.html""" )201 SKIP : failures/expected/image.html""", is_lint_mode=True) 199 202 self.assertFalse(True, "ParseError wasn't raised") 200 203 except ParseError, e: 201 self.assertTrue(e.fatal) 202 exp_errors = [u":1 Test lacks BUG modifier. failures/expected/text.html", 203 u":1 Unrecognized modifier 'foo' failures/expected/text.html", 204 u":2 Missing expectations SKIP : failures/expected/image.html"] 205 self.assertEqual(str(e), '\n'.join(self._port.path_to_test_expectations_file() + str(error) for error in exp_errors)) 206 207 def test_parse_error_nonfatal(self): 204 warnings = [u":1 Test lacks BUG modifier. failures/expected/text.html", 205 u":1 Unrecognized modifier 'foo' failures/expected/text.html", 206 u":2 Missing expectations SKIP : failures/expected/image.html"] 207 self.assertEqual(str(e), '\n'.join(self._port.path_to_test_expectations_file() + str(warning) for warning in warnings)) 208 208 209 try: 209 210 self.parse_exp('SKIP : failures/expected/text.html = TEXT', is_lint_mode=True) 210 211 self.assertFalse(True, "ParseError wasn't raised") 211 212 except ParseError, e: 212 self.assertFalse(e.fatal) 213 exp_errors = [u':1 Test lacks BUG modifier. failures/expected/text.html'] 214 self.assertEqual(str(e), '\n'.join(self._port.path_to_test_expectations_file() + str(error) for error in exp_errors)) 213 warnings = [u':1 Test lacks BUG modifier. failures/expected/text.html'] 214 self.assertEqual(str(e), '\n'.join(self._port.path_to_test_expectations_file() + str(warning) for warning in warnings)) 215 215 216 216 def test_error_on_different_platform(self): … … 238 238 239 239 def test_overrides__duplicate(self): 240 self.assertRaises(ParseError, self.parse_exp, 241 "BUG_EXP: failures/expected/text.html = TEXT", 242 """ 243 BUG_OVERRIDE : failures/expected/text.html = IMAGE 244 BUG_OVERRIDE : failures/expected/text.html = CRASH 245 """) 240 self.assert_bad_expectations("BUG_EXP: failures/expected/text.html = TEXT", 241 "BUG_OVERRIDE : failures/expected/text.html = IMAGE\n" 242 "BUG_OVERRIDE : failures/expected/text.html = CRASH\n") 246 243 247 244 def test_pixel_tests_flag(self): … … 288 285 def test_missing_expectation(self): 289 286 # This is missing the expectation. 290 self.assertRaises(ParseError, self.parse_exp, 291 'BUG_TEST: failures/expected/text.html') 287 self.assert_bad_expectations('BUG_TEST: failures/expected/text.html') 292 288 293 289 def test_missing_colon(self): 294 290 # This is missing the modifiers and the ':' 295 self.assertRaises(ParseError, self.parse_exp, 296 'failures/expected/text.html = TEXT') 297 298 def disabled_test_too_many_colons(self): 299 # FIXME: Enable this test and fix the underlying bug. 300 self.assertRaises(ParseError, self.parse_exp, 301 'BUG_TEST: failures/expected/text.html = PASS :') 291 self.assert_bad_expectations('failures/expected/text.html = TEXT') 292 293 def test_too_many_colons(self): 294 self.assert_bad_expectations('BUG_TEST: failures/expected/text.html = PASS :') 302 295 303 296 def test_too_many_equals_signs(self): 304 self.assertRaises(ParseError, self.parse_exp, 305 'BUG_TEST: failures/expected/text.html = TEXT = IMAGE') 297 self.assert_bad_expectations('BUG_TEST: failures/expected/text.html = TEXT = IMAGE') 306 298 307 299 def test_unrecognized_expectation(self): 308 self.assertRaises(ParseError, self.parse_exp, 309 'BUG_TEST: failures/expected/text.html = UNKNOWN') 300 self.assert_bad_expectations('BUG_TEST: failures/expected/text.html = UNKNOWN') 310 301 311 302 def test_macro(self): … … 319 310 class SemanticTests(Base): 320 311 def test_bug_format(self): 321 self.assertRaises(ParseError, self.parse_exp, 'BUG1234 : failures/expected/text.html = TEXT' )312 self.assertRaises(ParseError, self.parse_exp, 'BUG1234 : failures/expected/text.html = TEXT', is_lint_mode=True) 322 313 323 314 def test_bad_bugid(self): 324 315 try: 325 self.parse_exp('BUG1234 SLOW : failures/expected/text.html = TEXT' )316 self.parse_exp('BUG1234 SLOW : failures/expected/text.html = TEXT', is_lint_mode=True) 326 317 self.fail('should have raised an error about a bad bug identifier') 327 318 except ParseError, exp: 328 self.assertEquals(exp.fatal, True) 329 self.assertEquals(len(exp.errors), 1) 319 self.assertEquals(len(exp.warnings), 1) 330 320 331 321 def test_missing_bugid(self): 332 # This should log a non-fatal error.333 322 self.parse_exp('SLOW : failures/expected/text.html = TEXT') 334 323 self.assertTrue(self._exp.has_warnings()) … … 337 326 # A test cannot be SLOW and expected to TIMEOUT. 338 327 self.assertRaises(ParseError, self.parse_exp, 339 'BUG_TEST SLOW : failures/expected/timeout.html = TIMEOUT' )328 'BUG_TEST SLOW : failures/expected/timeout.html = TIMEOUT', is_lint_mode=True) 340 329 341 330 def test_rebaseline(self): … … 348 337 self.assertRaises(ParseError, self.parse_exp, """ 349 338 BUG_EXP : failures/expected/text.html = TEXT 350 BUG_EXP : failures/expected/text.html = IMAGE""" )339 BUG_EXP : failures/expected/text.html = IMAGE""", is_lint_mode=True) 351 340 352 341 self.assertRaises(ParseError, self.parse_exp, 353 342 self.get_basic_expectations(), overrides=""" 354 343 BUG_OVERRIDE : failures/expected/text.html = TEXT 355 BUG_OVERRIDE : failures/expected/text.html = IMAGE""", )344 BUG_OVERRIDE : failures/expected/text.html = IMAGE""", is_lint_mode=True) 356 345 357 346 def test_missing_file(self): … … 382 371 383 372 def test_ambiguous(self): 384 self.assertRaises(ParseError, self.parse_exp, """ 385 BUG_TEST RELEASE : passes/text.html = PASS 386 BUG_TEST WIN : passes/text.html = FAIL 387 """) 373 self.assert_bad_expectations("BUG_TEST RELEASE : passes/text.html = PASS\n" 374 "BUG_TEST WIN : passes/text.html = FAIL\n") 388 375 389 376 def test_more_modifiers(self): 390 exp_str = """ 391 BUG_TEST RELEASE : passes/text.html = PASS 392 BUG_TEST WIN RELEASE : passes/text.html = TEXT 393 """ 394 self.assertRaises(ParseError, self.parse_exp, exp_str) 377 self.assert_bad_expectations("BUG_TEST RELEASE : passes/text.html = PASS\n" 378 "BUG_TEST WIN RELEASE : passes/text.html = TEXT\n") 395 379 396 380 def test_order_in_file(self): 397 exp_str = """ 398 BUG_TEST WIN RELEASE : passes/text.html = TEXT 399 BUG_TEST RELEASE : passes/text.html = PASS 400 """ 401 self.assertRaises(ParseError, self.parse_exp, exp_str) 381 self.assert_bad_expectations("BUG_TEST WIN RELEASE : passes/text.html = TEXT\n" 382 "BUG_TEST RELEASE : passes/text.html = PASS\n") 402 383 403 384 def test_macro_overrides(self): 404 exp_str = """ 405 BUG_TEST WIN : passes/text.html = PASS 406 BUG_TEST XP : passes/text.html = TEXT 407 """ 408 self.assertRaises(ParseError, self.parse_exp, exp_str) 385 self.assert_bad_expectations("BUG_TEST WIN : passes/text.html = PASS\n" 386 "BUG_TEST XP : passes/text.html = TEXT\n") 409 387 410 388 … … 412 390 """Test rebaselining-specific functionality.""" 413 391 def assertRemove(self, input_expectations, tests, expected_expectations): 414 self.parse_exp(input_expectations )392 self.parse_exp(input_expectations, is_lint_mode=False) 415 393 actual_expectations = self._exp.remove_rebaselined_tests(tests) 416 394 self.assertEqual(expected_expectations, actual_expectations) … … 432 410 def test_tokenize_blank(self): 433 411 expectation = TestExpectationParser._tokenize('') 434 self.assertEqual(expectation.is_malformed(), False)435 412 self.assertEqual(expectation.comment, None) 436 self.assertEqual(len(expectation. errors), 0)413 self.assertEqual(len(expectation.warnings), 0) 437 414 438 415 def test_tokenize_missing_colon(self): 439 416 expectation = TestExpectationParser._tokenize('Qux.') 440 self.assertEqual(expectation.is_malformed(), True) 441 self.assertEqual(str(expectation.errors), '["Missing a \':\'"]') 417 self.assertEqual(str(expectation.warnings), '["Missing a \':\'"]') 442 418 443 419 def test_tokenize_extra_colon(self): 444 420 expectation = TestExpectationParser._tokenize('FOO : : bar') 445 self.assertEqual(expectation.is_malformed(), True) 446 self.assertEqual(str(expectation.errors), '["Extraneous \':\'"]') 421 self.assertEqual(str(expectation.warnings), '["Extraneous \':\'"]') 447 422 448 423 def test_tokenize_empty_comment(self): 449 424 expectation = TestExpectationParser._tokenize('//') 450 self.assertEqual(expectation.is_malformed(), False)451 425 self.assertEqual(expectation.comment, '') 452 self.assertEqual(len(expectation. errors), 0)426 self.assertEqual(len(expectation.warnings), 0) 453 427 454 428 def test_tokenize_comment(self): 455 429 expectation = TestExpectationParser._tokenize('//Qux.') 456 self.assertEqual(expectation.is_malformed(), False)457 430 self.assertEqual(expectation.comment, 'Qux.') 458 self.assertEqual(len(expectation. errors), 0)431 self.assertEqual(len(expectation.warnings), 0) 459 432 460 433 def test_tokenize_missing_equal(self): 461 434 expectation = TestExpectationParser._tokenize('FOO : bar') 462 self.assertEqual(expectation.is_malformed(), True) 463 self.assertEqual(str(expectation.errors), "['Missing expectations\']") 435 self.assertEqual(str(expectation.warnings), "['Missing expectations\']") 464 436 465 437 def test_tokenize_extra_equal(self): 466 438 expectation = TestExpectationParser._tokenize('FOO : bar = BAZ = Qux.') 467 self.assertEqual(expectation.is_malformed(), True) 468 self.assertEqual(str(expectation.errors), '["Extraneous \'=\'"]') 439 self.assertEqual(str(expectation.warnings), '["Extraneous \'=\'"]') 469 440 470 441 def test_tokenize_valid(self): 471 442 expectation = TestExpectationParser._tokenize('FOO : bar = BAZ') 472 self.assertEqual(expectation.is_malformed(), False)473 443 self.assertEqual(expectation.comment, None) 474 self.assertEqual(len(expectation. errors), 0)444 self.assertEqual(len(expectation.warnings), 0) 475 445 476 446 def test_tokenize_valid_with_comment(self): 477 447 expectation = TestExpectationParser._tokenize('FOO : bar = BAZ //Qux.') 478 self.assertEqual(expectation.is_malformed(), False)479 448 self.assertEqual(expectation.comment, 'Qux.') 480 449 self.assertEqual(str(expectation.modifiers), '[\'foo\']') 481 450 self.assertEqual(str(expectation.expectations), '[\'baz\']') 482 self.assertEqual(len(expectation. errors), 0)451 self.assertEqual(len(expectation.warnings), 0) 483 452 484 453 def test_tokenize_valid_with_multiple_modifiers(self): 485 454 expectation = TestExpectationParser._tokenize('FOO1 FOO2 : bar = BAZ //Qux.') 486 self.assertEqual(expectation.is_malformed(), False)487 455 self.assertEqual(expectation.comment, 'Qux.') 488 456 self.assertEqual(str(expectation.modifiers), '[\'foo1\', \'foo2\']') 489 457 self.assertEqual(str(expectation.expectations), '[\'baz\']') 490 self.assertEqual(len(expectation. errors), 0)458 self.assertEqual(len(expectation.warnings), 0) 491 459 492 460 def test_parse_empty_string(self): … … 539 507 expectation.modifiers = ['foo1', 'foO2'] 540 508 self.assertEqual(serializer.to_string(expectation), 'FOO1 FOO2 : bar = BAZ1 BAZ2 //Qux.') 541 expectation. errors.append('Oh the horror.')509 expectation.warnings.append('Oh the horror.') 542 510 self.assertEqual(serializer.to_string(expectation), '') 543 511 expectation.original_string = 'Yes it is!' -
trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
r106224 r106591 71 71 lint_failed = True 72 72 _log.error('') 73 for error in e.errors:74 _log.error( error)73 for warning in e.warnings: 74 _log.error(warning) 75 75 _log.error('') 76 76 files_linted.add(expectations_file) -
trunk/Tools/Scripts/webkitpy/style/checkers/test_expectations.py
r105948 r106591 99 99 100 100 if err: 101 level = 2 102 if err.fatal: 103 level = 5 104 for error in err.errors: 105 matched = self._output_regex.match(error) 101 level = 5 102 for warning in err.warnings: 103 matched = self._output_regex.match(warning) 106 104 if matched: 107 105 lineno, message = matched.group('line', 'message')
Note: See TracChangeset
for help on using the changeset viewer.