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

Side by Side Diff: client/site_tests/logging_LogVolume/logging_LogVolume.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, stat, subprocess, utils 5 import logging, os, re, stat, subprocess, utils
6 from autotest_lib.client.bin import test 6 from autotest_lib.client.bin import test
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 login, ui_test 8 from autotest_lib.client.cros import cros_ui_test, login
9 9
10 class logging_LogVolume(ui_test.UITest): 10 class logging_LogVolume(cros_ui_test.UITest):
11 version = 1 11 version = 1
12 12
13 13
14 def log_stateful_used(self): 14 def log_stateful_used(self):
15 output = utils.system_output('df /mnt/stateful_partition/') 15 output = utils.system_output('df /mnt/stateful_partition/')
16 matches = re.search('(\d+)%', output) 16 matches = re.search('(\d+)%', output)
17 if matches is None: 17 if matches is None:
18 error.TestError('df failed') 18 error.TestError('df failed')
19 self._perf['percent_stateful_used'] = int(matches.group(1)) 19 self._perf['percent_stateful_used'] = int(matches.group(1))
20 20
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 self._perf['bytes_unexpected'] = unexpected_bytes 102 self._perf['bytes_unexpected'] = unexpected_bytes
103 self._perf['files_unexpected'] = unexpected_files 103 self._perf['files_unexpected'] = unexpected_files
104 104
105 self._perf['files_in_stateful_partition'] = stateful_files 105 self._perf['files_in_stateful_partition'] = stateful_files
106 106
107 self._perf['percent_unused_patterns'] = \ 107 self._perf['percent_unused_patterns'] = \
108 int(100 * len(unmatched_patterns) / len(patterns)) 108 int(100 * len(unmatched_patterns) / len(patterns))
109 109
110 self.write_perf_keyval(self._perf) 110 self.write_perf_keyval(self._perf)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698