OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import logging, os, re | 5 import logging, os, re |
6 from autotest_lib.client.bin import site_log_reader, site_utils, test | 6 from autotest_lib.client.bin import site_log_reader, site_utils, test |
7 from autotest_lib.client.common_lib import error, utils | 7 from autotest_lib.client.common_lib import error, utils |
8 | 8 |
9 | 9 |
10 class CrashTest(test.test): | 10 class CrashTest(test.test): |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 payload_match = re.search('Payload: (\S+)', output) | 174 payload_match = re.search('Payload: (\S+)', output) |
175 if payload_match: | 175 if payload_match: |
176 report_payload = payload_match.group(1) | 176 report_payload = payload_match.group(1) |
177 else: | 177 else: |
178 report_payload = None | 178 report_payload = None |
179 exec_name_match = re.search('Exec name: (\S+)', output) | 179 exec_name_match = re.search('Exec name: (\S+)', output) |
180 if exec_name_match: | 180 if exec_name_match: |
181 exec_name = exec_name_match.group(1) | 181 exec_name = exec_name_match.group(1) |
182 else: | 182 else: |
183 exec_name = None | 183 exec_name = None |
184 sig_match = re.search('Sig: (\S+)', output) | 184 sig_match = re.search('sig: (\S+)', output) |
185 if sig_match: | 185 if sig_match: |
186 sig = sig_match.group(1) | 186 sig = sig_match.group(1) |
187 else: | 187 else: |
188 sig = None | 188 sig = None |
189 send_success = 'Mocking successful send' in output | 189 send_success = 'Mocking successful send' in output |
190 return {'exec_name': exec_name, | 190 return {'exec_name': exec_name, |
191 'report_kind': report_kind, | 191 'report_kind': report_kind, |
192 'meta_path': meta_path, | 192 'meta_path': meta_path, |
193 'report_payload': report_payload, | 193 'report_payload': report_payload, |
194 'send_attempt': send_attempt, | 194 'send_attempt': send_attempt, |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 self._initialize_crash_reporter() | 325 self._initialize_crash_reporter() |
326 # Disable crash_sender from running, kill off any running ones, but | 326 # Disable crash_sender from running, kill off any running ones, but |
327 # set environment so crash_sender may run as a child process. | 327 # set environment so crash_sender may run as a child process. |
328 self._set_system_sending(False) | 328 self._set_system_sending(False) |
329 self._set_child_sending(True) | 329 self._set_child_sending(True) |
330 self._kill_running_sender() | 330 self._kill_running_sender() |
331 self._reset_rate_limiting() | 331 self._reset_rate_limiting() |
332 if clear_spool_first: | 332 if clear_spool_first: |
333 self._clear_spooled_crashes() | 333 self._clear_spooled_crashes() |
334 getattr(self, '_test_' + test_name)() | 334 getattr(self, '_test_' + test_name)() |
OLD | NEW |