| OLD | NEW |
| 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 test_inputs = [] | 269 test_inputs = [] |
| 270 for _ in xrange(iterations): | 270 for _ in xrange(iterations): |
| 271 for test in tests_to_run: | 271 for test in tests_to_run: |
| 272 for _ in xrange(repeat_each): | 272 for _ in xrange(repeat_each): |
| 273 test_inputs.append(self._test_input_for_file(test)) | 273 test_inputs.append(self._test_input_for_file(test)) |
| 274 return self._runner.run_tests(self._expectations, test_inputs, tests_to_
skip, num_workers, retrying) | 274 return self._runner.run_tests(self._expectations, test_inputs, tests_to_
skip, num_workers, retrying) |
| 275 | 275 |
| 276 def _start_servers(self, tests_to_run): | 276 def _start_servers(self, tests_to_run): |
| 277 if self._port.requires_http_server() or any(self._is_http_test(test) for
test in tests_to_run): | 277 if self._port.requires_http_server() or any(self._is_http_test(test) for
test in tests_to_run): |
| 278 self._printer.write_update('Starting HTTP server ...') | 278 self._printer.write_update('Starting HTTP server ...') |
| 279 self._port.start_http_server(number_of_servers=(2 * self._options.ma
x_locked_shards)) | 279 self._port.start_http_server(number_of_drivers=self._options.max_loc
ked_shards) |
| 280 self._http_server_started = True | 280 self._http_server_started = True |
| 281 | 281 |
| 282 if any(self._is_websocket_test(test) for test in tests_to_run): | 282 if any(self._is_websocket_test(test) for test in tests_to_run): |
| 283 self._printer.write_update('Starting WebSocket server ...') | 283 self._printer.write_update('Starting WebSocket server ...') |
| 284 self._port.start_websocket_server() | 284 self._port.start_websocket_server() |
| 285 self._websockets_server_started = True | 285 self._websockets_server_started = True |
| 286 | 286 |
| 287 def _stop_servers(self): | 287 def _stop_servers(self): |
| 288 if self._http_server_started: | 288 if self._http_server_started: |
| 289 self._printer.write_update('Stopping HTTP server ...') | 289 self._printer.write_update('Stopping HTTP server ...') |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 return int(worker_name.split('/')[1]) if worker_name else -1 | 427 return int(worker_name.split('/')[1]) if worker_name else -1 |
| 428 | 428 |
| 429 stats = {} | 429 stats = {} |
| 430 for result in initial_results.results_by_name.values(): | 430 for result in initial_results.results_by_name.values(): |
| 431 if result.type != test_expectations.SKIP: | 431 if result.type != test_expectations.SKIP: |
| 432 stats[result.test_name] = {'results': (_worker_number(result.wor
ker_name), result.test_number, result.pid, int(result.test_run_time * 1000), int
(result.total_run_time * 1000))} | 432 stats[result.test_name] = {'results': (_worker_number(result.wor
ker_name), result.test_number, result.pid, int(result.test_run_time * 1000), int
(result.total_run_time * 1000))} |
| 433 stats_trie = {} | 433 stats_trie = {} |
| 434 for name, value in stats.iteritems(): | 434 for name, value in stats.iteritems(): |
| 435 json_results_generator.add_path_to_trie(name, value, stats_trie) | 435 json_results_generator.add_path_to_trie(name, value, stats_trie) |
| 436 return stats_trie | 436 return stats_trie |
| OLD | NEW |