Changeset 90528 in webkit
- Timestamp:
- Jul 6, 2011 8:18:51 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r90527 r90528 1 2011-07-06 Dirk Pranke <dpranke@chromium.org> 2 3 nrwt: fix typo preventing http startup on windows 4 https://bugs.webkit.org/show_bug.cgi?id=64050 5 6 Reviewed by Eric Siedel. 7 8 NRWT checks whether it needs to start the servers by looking 9 for "/http/" in the test names. After r90520, the leading slash 10 is not present, so the check isn't quite right. 11 12 * Scripts/webkitpy/layout_tests/controllers/manager.py: 13 * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py: 14 1 15 2011-07-06 Dirk Pranke <dpranke@chromium.org> 2 16 -
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
r90526 r90528 287 287 288 288 # a set of test files, and the same tests as a list 289 290 # FIXME: Rename to test_names. 289 291 self._test_files = set() 290 292 self._test_files_list = None … … 663 665 extract_and_flatten(some_shards))) 664 666 return new_shards 665 666 def _contains_tests(self, subdir):667 for test_file in self._test_files:668 if test_file.find(subdir) >= 0:669 return True670 return False671 667 672 668 def _log_num_workers(self, num_workers, num_shards, num_locked_shards): … … 814 810 return (thread_timings, test_timings, individual_test_timings) 815 811 816 def needs_http(self): 817 """Returns whether the test runner needs an HTTP server.""" 818 return self._contains_tests(self.HTTP_SUBDIR) 819 820 def needs_websocket(self): 821 """Returns whether the test runner needs a WEBSOCKET server.""" 822 return self._contains_tests(self.WEBSOCKET_SUBDIR) 812 def needs_servers(self): 813 return any(self._test_requires_lock(test_name) for test_name in self._test_files) 823 814 824 815 def set_up_run(self): … … 837 828 if not self._options.nocheck_sys_deps: 838 829 self._printer.print_update("Checking system dependencies ...") 839 if not self._port.check_sys_deps(self.needs_ http()):830 if not self._port.check_sys_deps(self.needs_servers()): 840 831 self._port.stop_helper() 841 832 return None -
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py
r90526 r90528 32 32 33 33 import StringIO 34 import sys 34 35 import unittest 35 36 … … 39 40 from webkitpy import layout_tests 40 41 from webkitpy.layout_tests import port 42 from webkitpy.layout_tests.port import port_testcase 41 43 42 44 from webkitpy import layout_tests … … 187 189 exception = self.assertRaises(TestRunInterruptedException, manager._interrupt_if_at_failure_limits, result_summary) 188 190 191 def test_needs_servers(self): 192 def get_manager_with_tests(test_names): 193 port = Mock() 194 port.TEST_PATH_SEPARATOR = '/' 195 manager = Manager(port, options=MockOptions(), printer=Mock()) 196 manager._test_files = set(test_names) 197 manager._test_files_list = test_names 198 return manager 199 200 manager = get_manager_with_tests(['fast/html']) 201 self.assertFalse(manager.needs_servers()) 202 203 manager = get_manager_with_tests(['http/tests/misc']) 204 self.assertTrue(manager.needs_servers()) 205 206 def integration_test_needs_servers(self): 207 def get_manager_with_tests(test_names): 208 port = layout_tests.port.get() 209 manager = Manager(port, options=MockOptions(test_list=None), printer=Mock()) 210 manager.collect_tests(test_names, last_unexpected_results=[]) 211 return manager 212 213 manager = get_manager_with_tests(['fast/html']) 214 self.assertFalse(manager.needs_servers()) 215 216 manager = get_manager_with_tests(['http/tests/mime']) 217 self.assertTrue(manager.needs_servers()) 218 219 if sys.platform == 'win32': 220 manager = get_manager_with_tests(['fast\\html']) 221 self.assertFalse(manager.needs_servers()) 222 223 manager = get_manager_with_tests(['http\\tests\\mime']) 224 self.assertTrue(manager.needs_servers()) 225 189 226 190 227 class NaturalCompareTest(unittest.TestCase): … … 229 266 230 267 if __name__ == '__main__': 231 unittest.main()268 port_testcase.main() -
trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
r90527 r90528 110 110 111 111 printer.print_update("Checking build ...") 112 if not port.check_build(manager.needs_ http()):112 if not port.check_build(manager.needs_servers()): 113 113 _log.error("Build check failed") 114 114 return -1
Note: See TracChangeset
for help on using the changeset viewer.