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

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py

Issue 23496003: User interruption should still create results.html for run-webkit-tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Corrected INTERRUPTED_EXIT_STATUS import Created 7 years, 3 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 | Tools/Scripts/webkitpy/layout_tests/controllers/manager.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) 2011 Google Inc. All rights reserved. 1 # Copyright (C) 2011 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 start_time = time.time() 113 start_time = time.time()
114 try: 114 try:
115 with message_pool.get(self, self._worker_factory, num_workers, self. _port.worker_startup_delay_secs(), self._port.host) as pool: 115 with message_pool.get(self, self._worker_factory, num_workers, self. _port.worker_startup_delay_secs(), self._port.host) as pool:
116 pool.run(('test_list', shard.name, shard.test_inputs) for shard in all_shards) 116 pool.run(('test_list', shard.name, shard.test_inputs) for shard in all_shards)
117 except TestRunInterruptedException, e: 117 except TestRunInterruptedException, e:
118 _log.warning(e.reason) 118 _log.warning(e.reason)
119 run_results.interrupted = True 119 run_results.interrupted = True
120 except KeyboardInterrupt: 120 except KeyboardInterrupt:
121 self._printer.flush() 121 self._printer.flush()
122 self._printer.writeln('Interrupted, exiting ...') 122 self._printer.writeln('Interrupted, exiting ...')
123 raise 123 run_results.keyboard_interrupted = True
124 except Exception, e: 124 except Exception, e:
125 _log.debug('%s("%s") raised, exiting' % (e.__class__.__name__, str(e ))) 125 _log.debug('%s("%s") raised, exiting' % (e.__class__.__name__, str(e )))
126 raise 126 raise
127 finally: 127 finally:
128 run_results.run_time = time.time() - start_time 128 run_results.run_time = time.time() - start_time
129 129
130 return run_results 130 return run_results
131 131
132 def _worker_factory(self, worker_connection): 132 def _worker_factory(self, worker_connection):
133 results_directory = self._results_directory 133 results_directory = self._results_directory
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 def split_at(seq, index): 458 def split_at(seq, index):
459 return (seq[:index], seq[index:]) 459 return (seq[:index], seq[index:])
460 460
461 num_old_per_new = divide_and_round_up(len(old_shards), max_new_shards) 461 num_old_per_new = divide_and_round_up(len(old_shards), max_new_shards)
462 new_shards = [] 462 new_shards = []
463 remaining_shards = old_shards 463 remaining_shards = old_shards
464 while remaining_shards: 464 while remaining_shards:
465 some_shards, remaining_shards = split_at(remaining_shards, num_old_p er_new) 465 some_shards, remaining_shards = split_at(remaining_shards, num_old_p er_new)
466 new_shards.append(TestShard('%s_%d' % (shard_name_prefix, len(new_sh ards) + 1), extract_and_flatten(some_shards))) 466 new_shards.append(TestShard('%s_%d' % (shard_name_prefix, len(new_sh ards) + 1), extract_and_flatten(some_shards)))
467 return new_shards 467 return new_shards
OLDNEW
« no previous file with comments | « no previous file | Tools/Scripts/webkitpy/layout_tests/controllers/manager.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698