Changeset 110724 in webkit
- Timestamp:
- Mar 14, 2012 11:55:58 AM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r110722 r110724 1 2012-03-14 Dirk Pranke <dpranke@chromium.org> 2 3 Please add a way to manually skip some tests in NRWT 4 https://bugs.webkit.org/show_bug.cgi?id=81019 5 6 Reviewed by Ojan Vafai. 7 8 This patch implements the -i / --ignore-tests flag from ORWT 9 and refactors the test_expectations.py code slightly to handle 10 it. 11 12 * Scripts/webkitpy/layout_tests/controllers/manager.py: 13 (Manager.parse_expectations): 14 * Scripts/webkitpy/layout_tests/models/test_expectations.py: 15 (TestExpectations.__init__): 16 * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py: 17 (test_add_skipped_tests): 18 (test_add_skipped_tests_duplicate): 19 * Scripts/webkitpy/layout_tests/run_webkit_tests.py: 20 (parse_args): 21 * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: 22 (MainTest.test_ignore_tests): 23 (MainTest.test_ignore_tests.assert_ignored): 24 1 25 2012-03-14 Dirk Pranke <dpranke@chromium.org> 2 26 -
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
r108413 r110724 365 365 invalid syntax.""" 366 366 port = self._port 367 tests_to_ignore = set(self._options.ignore_tests) 367 368 self._expectations = test_expectations.TestExpectations( 368 369 port, … … 371 372 port.test_configuration(), 372 373 self._options.lint_test_files, 373 port.test_expectations_overrides()) 374 port.test_expectations_overrides(), 375 port.skipped_tests(self._test_files).union(tests_to_ignore)) 374 376 375 377 def _split_into_chunks_if_necessary(self, skipped): -
trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
r108143 r110724 688 688 689 689 def __init__(self, port, tests, expectations, 690 test_config, is_lint_mode=False, overrides=None): 690 test_config, is_lint_mode=False, overrides=None, 691 skipped_tests=None): 691 692 """Loads and parses the test expectations given in the string. 692 693 Args: … … 703 704 that need to manage two sets of expectations (e.g., upstream 704 705 and downstream expectations). 706 skipped_tests: test paths to skip. 705 707 """ 706 708 self._full_test_list = tests … … 714 716 self._expectations = self._parser.parse(expectations) 715 717 self._add_expectations(self._expectations, overrides_allowed=False) 716 self._add_skipped_tests( port.skipped_tests(tests))718 self._add_skipped_tests(skipped_tests or []) 717 719 718 720 if overrides: -
trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
r110514 r110724 263 263 def test_add_skipped_tests(self): 264 264 port = MockHost().port_factory.get('qt') 265 port._filesystem.files[port._filesystem.join(port.layout_tests_dir(), 'platform/qt/Skipped')] = 'failures/expected/text.html'266 265 port._filesystem.files[port._filesystem.join(port.layout_tests_dir(), 'failures/expected/text.html')] = 'foo' 267 expectations = TestExpectations(port, tests=['failures/expected/text.html'], expectations='', test_config=port.test_configuration() )266 expectations = TestExpectations(port, tests=['failures/expected/text.html'], expectations='', test_config=port.test_configuration(), skipped_tests=set(['failures/expected/text.html'])) 268 267 self.assertEquals(expectations.get_modifiers('failures/expected/text.html'), [TestExpectationParser.DUMMY_BUG_MODIFIER, TestExpectationParser.SKIP_MODIFIER]) 269 268 self.assertEquals(expectations.get_expectations('failures/expected/text.html'), set([PASS])) … … 271 270 def test_add_skipped_tests_duplicate(self): 272 271 port = MockHost().port_factory.get('qt') 273 port._filesystem.files[port._filesystem.join(port.layout_tests_dir(), 'platform/qt/Skipped')] = 'failures/expected/text.html'274 272 port._filesystem.files[port._filesystem.join(port.layout_tests_dir(), 'failures/expected/text.html')] = 'foo' 275 self.assertRaises(ParseError, TestExpectations, port, tests=['failures/expected/text.html'], expectations='BUGX : failures/expected/text.html = text\n', test_config=port.test_configuration(), is_lint_mode=True )273 self.assertRaises(ParseError, TestExpectations, port, tests=['failures/expected/text.html'], expectations='BUGX : failures/expected/text.html = text\n', test_config=port.test_configuration(), is_lint_mode=True, skipped_tests=set(['failures/expected/text.html'])) 276 274 277 275 -
trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
r107718 r110724 380 380 # -i|--ignore-tests Comma-separated list of directories 381 381 # or tests to ignore 382 optparse.make_option("-i", "--ignore-tests", action="append", default=[], 383 help="directories or test to ignore (may specify multiple times)"), 382 384 optparse.make_option("--test-list", action="append", 383 385 help="read list of tests to run from file", metavar="FILE"), -
trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
r109429 r110724 398 398 self.assertEquals(tests_run, ['passes/image.html', 'passes/text.html']) 399 399 400 def test_ignore_tests(self): 401 def assert_ignored(args, tests_expected_to_run): 402 tests_to_run = ['failures/expected/image.html', 'passes/image.html'] 403 tests_run = get_tests_run(args + tests_to_run, tests_included=True, flatten_batches=True) 404 self.assertEquals(tests_run, tests_expected_to_run) 405 406 assert_ignored(['-i', 'failures/expected/image.html'], ['passes/image.html']) 407 assert_ignored(['-i', 'passes'], ['failures/expected/image.html']) 408 409 # Note here that there is an expectation for failures/expected/image.html already, but 410 # it is overriden by the command line arg. This might be counter-intuitive. 411 # FIXME: This isn't currently working ... 412 # assert_ignored(['-i', 'failures/expected'], ['passes/image.html']) 413 400 414 def test_iterations(self): 401 415 tests_to_run = ['passes/image.html', 'passes/text.html']
Note: See TracChangeset
for help on using the changeset viewer.