Changeset 128117 in webkit
- Timestamp:
- Sep 10, 2012 3:22:01 PM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r128108 r128117 1 2012-09-10 Christophe Dumez <christophe.dumez@intel.com> 2 3 TestExpectationsChecker._determine_port_from_expectations_path() does not support cascaded TestExpectations 4 https://bugs.webkit.org/show_bug.cgi?id=96205 5 6 Reviewed by Tony Chang. 7 8 _determine_port_from_expectations_path() was calling port.path_to_test_expectations_file() 9 internally, which means that it would support only 1 TestExpectations file per port. This 10 is an issue for ports such as EFL that support cascased TestExpectations (efl-wk2 -> efl 11 and efl-wk1 -> efl). 12 13 This patch makes _determine_port_from_expectations_path() call port.expectations_files() 14 instead so that all the ports TestExpectations are recognized. The ports are also 15 constructed twice, with "webkit_test_runner" option set to True and False so that we 16 retrieve the TestExpectations paths for both WebKit1 and WebKit2. 17 18 * Scripts/webkitpy/style/checkers/test_expectations.py: 19 (TestExpectationsChecker._determine_port_from_expectations_path): 20 * Scripts/webkitpy/style/checkers/test_expectations_unittest.py: Add corresponding unit test. 21 (TestExpectationsTestCase.test_determine_port_from_expectations_path): 22 1 23 2012-09-10 Ryuan Choi <ryuan.choi@samsung.com> 2 24 -
trunk/Tools/Scripts/webkitpy/style/checkers/test_expectations.py
r127910 r128117 50 50 def _determine_port_from_expectations_path(self, host, expectations_path): 51 51 # Pass a configuration to avoid calling default_configuration() when initializing the port (takes 0.5 seconds on a Mac Pro!). 52 options = optparse.Values({'configuration': 'Release'}) 52 options_wk1 = optparse.Values({'configuration': 'Release', 'webkit_test_runner': False}) 53 options_wk2 = optparse.Values({'configuration': 'Release', 'webkit_test_runner': True}) 53 54 for port_name in host.port_factory.all_port_names(): 54 port = host.port_factory.get(port_name, options=options) 55 if port.path_to_test_expectations_file().replace(port.path_from_webkit_base() + host.filesystem.sep, '') == expectations_path: 56 return port 55 ports = [host.port_factory.get(port_name, options=options_wk1), host.port_factory.get(port_name, options=options_wk2)] 56 for port in ports: 57 for test_expectation_file in port.expectations_files(): 58 if test_expectation_file.replace(port.path_from_webkit_base() + host.filesystem.sep, '') == expectations_path: 59 return port 57 60 return None 58 61 -
trunk/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
r127910 r128117 80 80 self._expect_port_for_expectations_path(None, '/mock-checkout/LayoutTests/platform/win/TestExpectations') 81 81 self._expect_port_for_expectations_path('win', 'LayoutTests/platform/win/TestExpectations') 82 self._expect_port_for_expectations_path('efl', 'LayoutTests/platform/efl/TestExpectations') 83 self._expect_port_for_expectations_path('efl', 'LayoutTests/platform/efl-wk1/TestExpectations') 84 self._expect_port_for_expectations_path('efl', 'LayoutTests/platform/efl-wk2/TestExpectations') 82 85 83 86 def assert_lines_lint(self, lines, should_pass, expected_output=None):
Note: See TracChangeset
for help on using the changeset viewer.