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

Side by Side Diff: client/cros/cryptohome.py

Issue 6626031: Fix import of some autotest cros modules, make them callable outside of autotest runtime. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 9 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
« no previous file with comments | « client/cros/chrome_test.py ('k') | client/cros/dns_server.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, utils 5 import logging, os, re
6 import common 6 import common
7 import constants as chromeos_constants 7 import constants as chromeos_constants
8 from autotest_lib.client.bin import test 8 from autotest_lib.client.bin import test, utils
9 from autotest_lib.client.common_lib import error 9 from autotest_lib.client.common_lib import error
10 10
11 11
12 CRYPTOHOME_CMD = '/usr/sbin/cryptohome' 12 CRYPTOHOME_CMD = '/usr/sbin/cryptohome'
13 13
14 class ChromiumOSError(error.InstallError): 14 class ChromiumOSError(error.InstallError):
15 """Generic error for ChromiumOS-specific exceptions.""" 15 """Generic error for ChromiumOS-specific exceptions."""
16 pass 16 pass
17 17
18 18
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 return len(mount_parts) > 0 and re.match(device, mount_parts[0]) 87 return len(mount_parts) > 0 and re.match(device, mount_parts[0])
88 88
89 89
90 def is_mounted_on_tmpfs(device = chromeos_constants.CRYPTOHOME_INCOGNITO, 90 def is_mounted_on_tmpfs(device = chromeos_constants.CRYPTOHOME_INCOGNITO,
91 expected_mountpt = 91 expected_mountpt =
92 chromeos_constants.CRYPTOHOME_MOUNT_PT, 92 chromeos_constants.CRYPTOHOME_MOUNT_PT,
93 allow_fail = False): 93 allow_fail = False):
94 mount_parts = __get_mount_parts(device, allow_fail) 94 mount_parts = __get_mount_parts(device, allow_fail)
95 return (len(mount_parts) > 2 and device == mount_parts[0] and 95 return (len(mount_parts) > 2 and device == mount_parts[0] and
96 'tmpfs' == mount_parts[2]) 96 'tmpfs' == mount_parts[2])
OLDNEW
« no previous file with comments | « client/cros/chrome_test.py ('k') | client/cros/dns_server.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698