| 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 utils | 6 from autotest_lib.client.bin import utils |
| 7 from autotest_lib.client.common_lib import error | 7 from autotest_lib.client.common_lib import error |
| 8 from autotest_lib.client.cros import crash_test | 8 from autotest_lib.client.cros import crash_test |
| 9 | 9 |
| 10 | 10 |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 | 247 |
| 248 def _test_cron_runs(self): | 248 def _test_cron_runs(self): |
| 249 """Test sender runs successfully as part of the hourly cron job. | 249 """Test sender runs successfully as part of the hourly cron job. |
| 250 | 250 |
| 251 Assuming we've run test_sender_simple which shows that a minidump | 251 Assuming we've run test_sender_simple which shows that a minidump |
| 252 gets removed as part of sending, we run the cron job (which is | 252 gets removed as part of sending, we run the cron job (which is |
| 253 asynchronous) and wait for that file to be removed to just verify | 253 asynchronous) and wait for that file to be removed to just verify |
| 254 the job eventually runs the sender.""" | 254 the job eventually runs the sender.""" |
| 255 minidump = self._prepare_sender_one_crash(send_success=True, | 255 minidump = self._prepare_sender_one_crash(send_success=True, |
| 256 reports_enabled=True, | 256 reports_enabled=True, |
| 257 username='root', | |
| 258 report=None) | 257 report=None) |
| 259 if not os.path.exists(minidump): | 258 if not os.path.exists(minidump): |
| 260 raise error.TestError('minidump not created') | 259 raise error.TestError('minidump not created') |
| 261 self._log_reader.set_start_by_current() | 260 self._log_reader.set_start_by_current() |
| 262 utils.system(_CRASH_SENDER_CRON_PATH) | 261 utils.system(_CRASH_SENDER_CRON_PATH) |
| 263 self.wait_for_sender_completion() | 262 self.wait_for_sender_completion() |
| 264 if os.path.exists(minidump): | 263 if os.path.exists(minidump): |
| 265 raise error.TestFail('minidump was not removed') | 264 raise error.TestFail('minidump was not removed') |
| 266 crash_sender_log = self._log_reader.get_logs() | 265 crash_sender_log = self._log_reader.get_logs() |
| 267 logging.debug('Contents of crash sender log: ' + crash_sender_log) | 266 logging.debug('Contents of crash sender log: ' + crash_sender_log) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 279 'sender_simple_kernel_crash', | 278 'sender_simple_kernel_crash', |
| 280 'sender_pausing', | 279 'sender_pausing', |
| 281 'sender_reports_disabled', | 280 'sender_reports_disabled', |
| 282 'sender_rate_limiting', | 281 'sender_rate_limiting', |
| 283 'sender_single_instance', | 282 'sender_single_instance', |
| 284 'sender_send_fails', | 283 'sender_send_fails', |
| 285 'sender_orphaned_files', | 284 'sender_orphaned_files', |
| 286 'sender_incomplete_metadata', | 285 'sender_incomplete_metadata', |
| 287 'sender_missing_payload', | 286 'sender_missing_payload', |
| 288 'cron_runs']) | 287 'cron_runs']) |
| OLD | NEW |