Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(675)

Side by Side Diff: client/site_tests/logging_CrashSender/logging_CrashSender.py

Issue 5740004: Move site_chrome_test, site_logging, site_log_reader, site_crash_test into cros dir. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_crash_test, utils, test 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
9
8 10
9 _25_HOURS_AGO = -25 * 60 * 60 11 _25_HOURS_AGO = -25 * 60 * 60
10 _CRASH_SENDER_CRON_PATH = '/etc/cron.hourly/crash_sender.hourly' 12 _CRASH_SENDER_CRON_PATH = '/etc/cron.hourly/crash_sender.hourly'
11 _DAILY_RATE_LIMIT = 32 13 _DAILY_RATE_LIMIT = 32
12 _MIN_UNIQUE_TIMES = 4 14 _MIN_UNIQUE_TIMES = 4
13 _HWCLASS_PATH = '/sys/devices/platform/chromeos_acpi/HWID' 15 _HWCLASS_PATH = '/sys/devices/platform/chromeos_acpi/HWID'
14 _SECONDS_SEND_SPREAD = 3600 16 _SECONDS_SEND_SPREAD = 3600
15 17
16 class logging_CrashSender(site_crash_test.CrashTest): 18 class logging_CrashSender(crash_test.CrashTest):
17 version = 1 19 version = 1
18 20
19 21
20 def _check_hardware_info(self, result): 22 def _check_hardware_info(self, result):
21 # Get board name 23 # Get board name
22 lsb_release = utils.read_file('/etc/lsb-release') 24 lsb_release = utils.read_file('/etc/lsb-release')
23 board_match = re.search(r'CHROMEOS_RELEASE_BOARD=(.*)', lsb_release) 25 board_match = re.search(r'CHROMEOS_RELEASE_BOARD=(.*)', lsb_release)
24 if not ('Board: %s' % board_match.group(1)) in result['output']: 26 if not ('Board: %s' % board_match.group(1)) in result['output']:
25 raise error.TestFail('Missing board name %s in output' % 27 raise error.TestFail('Missing board name %s in output' %
26 board_match.group(1)) 28 board_match.group(1))
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 'sender_simple_kernel_crash', 279 'sender_simple_kernel_crash',
278 'sender_pausing', 280 'sender_pausing',
279 'sender_reports_disabled', 281 'sender_reports_disabled',
280 'sender_rate_limiting', 282 'sender_rate_limiting',
281 'sender_single_instance', 283 'sender_single_instance',
282 'sender_send_fails', 284 'sender_send_fails',
283 'sender_orphaned_files', 285 'sender_orphaned_files',
284 'sender_incomplete_metadata', 286 'sender_incomplete_metadata',
285 'sender_missing_payload', 287 'sender_missing_payload',
286 'cron_runs']) 288 'cron_runs'])
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698