Changeset 76413 in webkit
- Timestamp:
- Jan 21, 2011 5:29:59 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r76401 r76413 1 2011-01-21 Dirk Pranke <dpranke@chromium.org> 2 3 Reviewed by Mihai Parparita. 4 5 Fix bug introduced in r76322 that caused NRWT to not actually 6 read the Skipped files properly. 7 8 https://bugs.webkit.org/show_bug.cgi?id=52771 9 10 * Scripts/webkitpy/layout_tests/port/mac_unittest.py: 11 * Scripts/webkitpy/layout_tests/port/webkit.py: 12 * Scripts/webkitpy/layout_tests/port/webkit_unittest.py: 13 1 14 2011-01-21 Sam Weinig <sam@webkit.org> 2 15 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py
r70013 r76413 70 70 ] 71 71 72 def test_ skipped_file_paths(self):72 def test_tests_from_skipped_file_contents(self): 73 73 port = self.make_port() 74 74 if not port: 75 75 return 76 skipped_file = StringIO.StringIO(self.example_skipped_file) 77 self.assertEqual(port._tests_from_skipped_file(skipped_file), self.example_skipped_tests) 76 self.assertEqual(port._tests_from_skipped_file_contents(self.example_skipped_file), self.example_skipped_tests) 78 77 79 78 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py
r76322 r76413 284 284 return disabled_feature_tests + webarchive_tests + unsupported_feature_tests 285 285 286 def _tests_from_skipped_file (self, skipped_file):286 def _tests_from_skipped_file_contents(self, skipped_file_contents): 287 287 tests_to_skip = [] 288 for line in skipped_file .readlines():288 for line in skipped_file_contents.split('\n'): 289 289 line = line.strip() 290 290 if line.startswith('#') or not len(line): … … 302 302 _log.warn("Failed to open Skipped file: %s" % filename) 303 303 continue 304 skipped_file = self._filesystem.read_text_file(filename) 304 skipped_file_contents = self._filesystem.read_text_file(filename) 305 tests_to_skip.extend(self._tests_from_skipped_file_contents(skipped_file_contents)) 305 306 return tests_to_skip 306 307 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit_unittest.py
r68552 r76413 1 1 #!/usr/bin/env python 2 2 # Copyright (C) 2010 Gabor Rapcsanyi <rgabor@inf.u-szeged.hu>, University of Szeged 3 # Copyright (C) 2010 Google Inc. All rights reserved. 3 4 # 4 5 # All rights reserved. … … 27 28 import unittest 28 29 30 from webkitpy.common.system import filesystem_mock 31 29 32 from webkitpy.layout_tests.port.webkit import WebKitPort 30 33 31 34 32 35 class TestWebKitPort(WebKitPort): 33 def __init__(self, symbol_list=None, feature_list=None): 36 def __init__(self, symbol_list=None, feature_list=None, 37 expectations_file=None, skips_file=None, **kwargs): 34 38 self.symbol_list = symbol_list 35 39 self.feature_list = feature_list 40 self.expectations_file = expectations_file 41 self.skips_file = skips_file 42 WebKitPort.__init__(self, **kwargs) 36 43 37 44 def _runtime_feature_list(self): … … 47 54 return ["accessibility", ] 48 55 56 def path_to_test_expectations_file(self): 57 if self.expectations_file: 58 return self.expectations_file 59 return WebKitPort.path_to_test_expectations_file(self) 60 49 61 def _skipped_file_paths(self): 62 if self.skips_file: 63 return [self.skips_file] 50 64 return [] 51 65 … … 67 81 self.assertEqual(TestWebKitPort(None, None).skipped_layout_tests(), 68 82 set(["media", "accessibility"])) 83 84 def test_test_expectations(self): 85 # Check that we read both the expectations file and anything in a 86 # Skipped file, and that we include the feature and platform checks. 87 files = { 88 '/tmp/test_expectations.txt': 'BUG_TESTEXPECTATIONS SKIP : fast/html/article-element.html = FAIL\n', 89 '/tmp/Skipped': 'fast/html/keygen.html', 90 } 91 mock_fs = filesystem_mock.MockFileSystem(files) 92 port = TestWebKitPort(expectations_file='/tmp/test_expectations.txt', 93 skips_file='/tmp/Skipped', filesystem=mock_fs) 94 self.assertEqual(port.test_expectations(), 95 """BUG_TESTEXPECTATIONS SKIP : fast/html/article-element.html = FAIL 96 BUG_SKIPPED SKIP : fast/html/keygen.html = FAIL 97 BUG_SKIPPED SKIP : media = FAIL 98 BUG_SKIPPED SKIP : accessibility = FAIL""") 99 100 101 if __name__ == '__main__': 102 unittest.main()
Note: See TracChangeset
for help on using the changeset viewer.