Chromium Code Reviews| Index: Tools/Scripts/webkitpy/layout_tests/port/driver.py |
| diff --git a/Tools/Scripts/webkitpy/layout_tests/port/driver.py b/Tools/Scripts/webkitpy/layout_tests/port/driver.py |
| index fda859e39504a2768fd9c4f1d080e9113edb698a..01118f6f3a6d40546448395fad9399fdc9486f95 100644 |
| --- a/Tools/Scripts/webkitpy/layout_tests/port/driver.py |
| +++ b/Tools/Scripts/webkitpy/layout_tests/port/driver.py |
| @@ -150,7 +150,7 @@ class Driver(object): |
| Returns a DriverOutput object. |
| """ |
| start_time = time.time() |
| - self.start(driver_input.should_run_pixel_test, driver_input.args) |
| + self.start(driver_input.should_run_pixel_test, driver_input.args, int(driver_input.timeout)) |
|
Dirk Pranke
2014/07/17 00:31:16
This timeout value might be quite long; you might
ivandavid
2014/07/17 03:04:48
Done.
ivandavid
2014/07/17 03:04:48
Ok. I made it work based on the wall clock in the
|
| test_begin_time = time.time() |
| self.error_from_test = str() |
| self.err_seen_eof = False |
| @@ -265,7 +265,7 @@ class Driver(object): |
| return True |
| return False |
| - def start(self, pixel_tests, per_test_args): |
| + def start(self, pixel_tests, per_test_args, deadline=0): |
|
Dirk Pranke
2014/07/17 00:31:16
See comments above re: deadline and wall-clock tim
ivandavid
2014/07/17 03:04:48
Done.
ivandavid
2014/07/17 03:04:48
I removed the default value, is that ok?
|
| new_cmd_line = self.cmd_line(pixel_tests, per_test_args) |
| if not self._server_process or new_cmd_line != self._current_cmd_line: |
| self._start(pixel_tests, per_test_args) |
| @@ -415,6 +415,13 @@ class Driver(object): |
| return (block.decoded_content, block.content_hash) |
| return (None, block.content_hash) |
| + def _read_stdin_path(self, deadline): |
| + # returns (stdin_path, bool) |
| + block = self._read_block(deadline) |
| + if block.stdin_path: |
| + return (block.stdin_path, True) |
| + return (None, False) |
|
Dirk Pranke
2014/07/17 00:31:15
If this is only called by browser_test_driver (whi
ivandavid
2014/07/17 03:04:48
Done.
|
| + |
| def _read_header(self, block, line, header_text, header_attr, header_filter=None): |
| if line.startswith(header_text) and getattr(block, header_attr) is None: |
| value = line.split()[1] |
| @@ -430,7 +437,8 @@ class Driver(object): |
| or self._read_header(block, line, 'Content-Length: ', '_content_length', int) |
| or self._read_header(block, line, 'ActualHash: ', 'content_hash') |
| or self._read_header(block, line, 'DumpMalloc: ', 'malloc') |
| - or self._read_header(block, line, 'DumpJSHeap: ', 'js_heap')): |
| + or self._read_header(block, line, 'DumpJSHeap: ', 'js_heap') |
| + or self._read_header(block, line, 'StdinPath', 'stdin_path')): |
| return |
| # Note, we're not reading ExpectedHash: here, but we could. |
| # If the line wasn't a header, we just append it to the content. |
| @@ -507,6 +515,7 @@ class ContentBlock(object): |
| self.decoded_content = None |
| self.malloc = None |
| self.js_heap = None |
| + self.stdin_path = None |
| def decode_content(self): |
| if self.encoding == 'base64' and self.content is not None: |