Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(838)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py

Issue 2110823002: Rename functions in Port related to wptserve and add a helper function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2010 Google Inc. All rights reserved. 1 # Copyright (C) 2010 Google Inc. All rights reserved.
2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze ged 2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Sze ged
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 return ( 223 return (
224 test.startswith(self.HTTP_SUBDIR) or 224 test.startswith(self.HTTP_SUBDIR) or
225 self._is_websocket_test(test) or 225 self._is_websocket_test(test) or
226 self._port.TEST_PATH_SEPARATOR + self.HTTP_SUBDIR in test 226 self._port.TEST_PATH_SEPARATOR + self.HTTP_SUBDIR in test
227 ) 227 )
228 228
229 def _is_inspector_test(self, test): 229 def _is_inspector_test(self, test):
230 return self.INSPECTOR_SUBDIR in test 230 return self.INSPECTOR_SUBDIR in test
231 231
232 def _is_websocket_test(self, test): 232 def _is_websocket_test(self, test):
233 if self._port.is_wpt_enabled() and self._port.is_wpt_test(test): 233 if self._port.should_use_wptserve(test):
234 return False 234 return False
235 235
236 return self.WEBSOCKET_SUBDIR in test 236 return self.WEBSOCKET_SUBDIR in test
237 237
238 def _http_tests(self, test_names): 238 def _http_tests(self, test_names):
239 return set(test for test in test_names if self._is_http_test(test)) 239 return set(test for test in test_names if self._is_http_test(test))
240 240
241 def _is_perf_test(self, test): 241 def _is_perf_test(self, test):
242 return self.PERF_SUBDIR == test or (self.PERF_SUBDIR + self._port.TEST_P ATH_SEPARATOR) in test 242 return self.PERF_SUBDIR == test or (self.PERF_SUBDIR + self._port.TEST_P ATH_SEPARATOR) in test
243 243
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 362
363 test_inputs = [] 363 test_inputs = []
364 for _ in xrange(iterations): 364 for _ in xrange(iterations):
365 for test in tests_to_run: 365 for test in tests_to_run:
366 for _ in xrange(repeat_each): 366 for _ in xrange(repeat_each):
367 test_inputs.append(self._test_input_for_file(test)) 367 test_inputs.append(self._test_input_for_file(test))
368 return self._runner.run_tests(self._expectations, test_inputs, 368 return self._runner.run_tests(self._expectations, test_inputs,
369 tests_to_skip, num_workers, retry_attempt) 369 tests_to_skip, num_workers, retry_attempt)
370 370
371 def _start_servers(self, tests_to_run): 371 def _start_servers(self, tests_to_run):
372 if self._port.is_wpt_enabled() and any(self._port.is_wpt_test(test) for test in tests_to_run): 372 if self._port.is_wptserve_enabled() and any(self._port.is_wptserve_test( test) for test in tests_to_run):
373 self._printer.write_update('Starting WPTServe ...') 373 self._printer.write_update('Starting WPTServe ...')
374 self._port.start_wptserve() 374 self._port.start_wptserve()
375 self._wptserve_started = True 375 self._wptserve_started = True
376 376
377 if self._port.requires_http_server() or any((self._is_http_test(test) or self._is_inspector_test(test)) 377 if self._port.requires_http_server() or any((self._is_http_test(test) or self._is_inspector_test(test))
378 for test in tests_to_run): 378 for test in tests_to_run):
379 self._printer.write_update('Starting HTTP server ...') 379 self._printer.write_update('Starting HTTP server ...')
380 self._port.start_http_server(additional_dirs={}, number_of_drivers=s elf._options.max_locked_shards) 380 self._port.start_http_server(additional_dirs={}, number_of_drivers=s elf._options.max_locked_shards)
381 self._http_server_started = True 381 self._http_server_started = True
382 382
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 553
554 stats = {} 554 stats = {}
555 for result in initial_results.results_by_name.values(): 555 for result in initial_results.results_by_name.values():
556 if result.type != test_expectations.SKIP: 556 if result.type != test_expectations.SKIP:
557 stats[result.test_name] = {'results': (_worker_number(result.wor ker_name), result.test_number, result.pid, int( 557 stats[result.test_name] = {'results': (_worker_number(result.wor ker_name), result.test_number, result.pid, int(
558 result.test_run_time * 1000), int(result.total_run_time * 10 00))} 558 result.test_run_time * 1000), int(result.total_run_time * 10 00))}
559 stats_trie = {} 559 stats_trie = {}
560 for name, value in stats.iteritems(): 560 for name, value in stats.iteritems():
561 json_results_generator.add_path_to_trie(name, value, stats_trie) 561 json_results_generator.add_path_to_trie(name, value, stats_trie)
562 return stats_trie 562 return stats_trie
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698