OLD | NEW |
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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 160 |
161 self._server_process.write(command) | 161 self._server_process.write(command) |
162 text, audio = self._read_first_block(deadline) # First block is either
text or audio | 162 text, audio = self._read_first_block(deadline) # First block is either
text or audio |
163 image, actual_image_hash = self._read_optional_image_block(deadline) #
The second (optional) block is image data. | 163 image, actual_image_hash = self._read_optional_image_block(deadline) #
The second (optional) block is image data. |
164 | 164 |
165 crashed = self.has_crashed() | 165 crashed = self.has_crashed() |
166 timed_out = self._server_process.timed_out | 166 timed_out = self._server_process.timed_out |
167 pid = self._server_process.pid() | 167 pid = self._server_process.pid() |
168 leaked = self._leaked | 168 leaked = self._leaked |
169 | 169 |
| 170 if not crashed and 'AddressSanitizer' in self.error_from_test: |
| 171 self.error_from_test = 'OUTPUT CONTAINS "AddressSanitizer", so we ar
e treating this test as if it crashed, even though it did not.\n\n' + self.error
_from_test |
| 172 crashed = True |
| 173 |
170 if stop_when_done or crashed or timed_out or leaked: | 174 if stop_when_done or crashed or timed_out or leaked: |
171 # We call stop() even if we crashed or timed out in order to get any
remaining stdout/stderr output. | 175 # We call stop() even if we crashed or timed out in order to get any
remaining stdout/stderr output. |
172 # In the timeout case, we kill the hung process as well. | 176 # In the timeout case, we kill the hung process as well. |
173 out, err = self._server_process.stop(self._port.driver_stop_timeout(
) if stop_when_done else 0.0) | 177 out, err = self._server_process.stop(self._port.driver_stop_timeout(
) if stop_when_done else 0.0) |
174 if out: | 178 if out: |
175 text += out | 179 text += out |
176 if err: | 180 if err: |
177 self.error_from_test += err | 181 self.error_from_test += err |
178 self._server_process = None | 182 self._server_process = None |
179 | 183 |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 self.content = str() # FIXME: Should be bytearray() once we require Pyt
hon 2.6. | 504 self.content = str() # FIXME: Should be bytearray() once we require Pyt
hon 2.6. |
501 self.decoded_content = None | 505 self.decoded_content = None |
502 self.malloc = None | 506 self.malloc = None |
503 self.js_heap = None | 507 self.js_heap = None |
504 | 508 |
505 def decode_content(self): | 509 def decode_content(self): |
506 if self.encoding == 'base64' and self.content is not None: | 510 if self.encoding == 'base64' and self.content is not None: |
507 self.decoded_content = base64.b64decode(self.content) | 511 self.decoded_content = base64.b64decode(self.content) |
508 else: | 512 else: |
509 self.decoded_content = self.content | 513 self.decoded_content = self.content |
OLD | NEW |