Index: client/site_tests/login_CryptohomeMounted/login_CryptohomeMounted.py |
diff --git a/client/site_tests/login_CryptohomeMounted/login_CryptohomeMounted.py b/client/site_tests/login_CryptohomeMounted/login_CryptohomeMounted.py |
index 28a99c1015556d068e616e2f7b699261dba77311..30d6dc01ec244252cb0bd2ddabc9f4fe5e2c87f0 100644 |
--- a/client/site_tests/login_CryptohomeMounted/login_CryptohomeMounted.py |
+++ b/client/site_tests/login_CryptohomeMounted/login_CryptohomeMounted.py |
@@ -2,7 +2,8 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
-import os, time |
+import os, utils, time |
+from autotest_lib.client.bin import chromeos_constants |
from autotest_lib.client.bin import site_cryptohome, site_login, test |
from autotest_lib.client.common_lib import error |
@@ -12,7 +13,7 @@ class login_CryptohomeMounted(test.test): |
def setup(self): |
site_login.setup_autox(self) |
- def run_once(self, script = 'autox_script.json', is_control = False): |
+ def run_once(self, script='autox_script.json', is_control=False): |
logged_in = site_login.logged_in() |
if not logged_in: |
@@ -20,9 +21,12 @@ class login_CryptohomeMounted(test.test): |
if not site_login.attempt_login(self, script): |
raise error.TestFail('Could not login') |
- if not site_cryptohome.is_mounted(allow_fail = is_control): |
- raise error.TestFail('Expected cryptohome to be mounted') |
+ if (not is_control and |
+ not site_cryptohome.is_mounted(allow_fail=is_control)): |
+ raise error.TestFail('CryptohomeIsMounted should return %s' % |
+ (not is_control)) |
# If we started logged out, log back out. |
if not logged_in: |
- site_login.attempt_logout() |
+ if not site_login.attempt_logout(): |
+ raise error.TestError('Could not log out') |