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

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/port/driver.py

Issue 1154343007: Add extra content_shell per worker for virtual tests, except on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: merge Created 5 years, 6 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
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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 self._port._path_to_driver(), self._port.results_directory(), pr ofiler_name) 136 self._port._path_to_driver(), self._port.results_directory(), pr ofiler_name)
137 else: 137 else:
138 self._profiler = None 138 self._profiler = None
139 139
140 def __del__(self): 140 def __del__(self):
141 self.stop() 141 self.stop()
142 142
143 def run_test(self, driver_input, stop_when_done): 143 def run_test(self, driver_input, stop_when_done):
144 """Run a single test and return the results. 144 """Run a single test and return the results.
145 145
146 Note that it is okay if a test times out or crashes and leaves 146 Note that it is okay if a test times out or crashes. content_shell
147 the driver in an indeterminate state. The upper layers of the program 147 will be stopped when the test ends, and then restarted for the next
148 are responsible for cleaning up and ensuring things are okay. 148 test when this function is invoked again. As part of the restart, the
149 state of Driver will be reset.
149 150
150 Returns a DriverOutput object. 151 Returns a DriverOutput object.
151 """ 152 """
152 start_time = time.time() 153 start_time = time.time()
153 stdin_deadline = start_time + int(driver_input.timeout) / 2000.0 154 stdin_deadline = start_time + int(driver_input.timeout) / 2000.0
154 self.start(driver_input.should_run_pixel_test, driver_input.args, stdin_ deadline) 155 self.start(driver_input.should_run_pixel_test, driver_input.args, stdin_ deadline)
155 test_begin_time = time.time() 156 test_begin_time = time.time()
156 self.error_from_test = str() 157 self.error_from_test = str()
157 self.err_seen_eof = False 158 self.err_seen_eof = False
158 159
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 self.decoded_content = None 517 self.decoded_content = None
517 self.malloc = None 518 self.malloc = None
518 self.js_heap = None 519 self.js_heap = None
519 self.stdin_path = None 520 self.stdin_path = None
520 521
521 def decode_content(self): 522 def decode_content(self):
522 if self.encoding == 'base64' and self.content is not None: 523 if self.encoding == 'base64' and self.content is not None:
523 self.decoded_content = base64.b64decode(self.content) 524 self.decoded_content = base64.b64decode(self.content)
524 else: 525 else:
525 self.decoded_content = self.content 526 self.decoded_content = self.content
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/port/base.py ('k') | Tools/Scripts/webkitpy/layout_tests/port/test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698