• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3# found in the LICENSE file.
4
5import dbus
6from autotest_lib.client.bin import test
7from autotest_lib.client.common_lib import error
8from autotest_lib.client.common_lib.cros import chrome
9
10class platform_CryptohomeSyncStress(test.test):
11    """
12    This test is intended to be used from platform_CryptohomeSyncStressServer.
13    """
14    version = 1
15
16    def run_once(self, username=None, password=None):
17        # log in.
18        with chrome.Chrome(username=username, password=password):
19
20            # make sure cryptohome is mounted
21            bus = dbus.SystemBus()
22            proxy = bus.get_object('org.chromium.Cryptohome',
23                                   '/org/chromium/Cryptohome')
24            cryptohome = dbus.Interface(proxy, 'org.chromium.CryptohomeInterface')
25
26            ismounted = cryptohome.IsMounted()
27            if not ismounted:
28                raise error.TestFail('Cryptohome failed to mount.')
29
30            self.job.set_state('client_fail', False)
31