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, shutil, time | 5 import logging, os, shutil, time |
6 from autotest_lib.client.bin import site_logging | |
7 from autotest_lib.client.common_lib import error | 6 from autotest_lib.client.common_lib import error |
| 7 from autotest_lib.client.cros import cros_logging |
8 from autotest_lib.server import autotest, site_host_attributes, test | 8 from autotest_lib.server import autotest, site_host_attributes, test |
9 | 9 |
10 _CONSENT_FILE = '/home/chronos/Consent To Send Stats' | 10 _CONSENT_FILE = '/home/chronos/Consent To Send Stats' |
11 _STOWED_CONSENT_FILE = '/var/lib/kernel-crash-server.consent' | 11 _STOWED_CONSENT_FILE = '/var/lib/kernel-crash-server.consent' |
12 | 12 |
13 | 13 |
14 class logging_KernelCrashServer(test.test): | 14 class logging_KernelCrashServer(test.test): |
15 version = 1 | 15 version = 1 |
16 | 16 |
17 | 17 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 # Check for crash handling without consent. | 84 # Check for crash handling without consent. |
85 client_at.run_test('logging_KernelCrash', | 85 client_at.run_test('logging_KernelCrash', |
86 tag='after-crash-no-consent', | 86 tag='after-crash-no-consent', |
87 is_before=False, | 87 is_before=False, |
88 consent=False) | 88 consent=False) |
89 | 89 |
90 def run_once(self, host=None): | 90 def run_once(self, host=None): |
91 # For the entire duration of this server test (across crashes | 91 # For the entire duration of this server test (across crashes |
92 # and boots after crashes) we want to disable log rotation. | 92 # and boots after crashes) we want to disable log rotation. |
93 log_pauser = site_logging.LogRotationPauser(host) | 93 log_pauser = cros_logging.LogRotationPauser(host) |
94 try: | 94 try: |
95 log_pauser.begin() | 95 log_pauser.begin() |
96 self._run_while_paused(host) | 96 self._run_while_paused(host) |
97 finally: | 97 finally: |
98 log_pauser.end() | 98 log_pauser.end() |
OLD | NEW |