• Home
  • History
  • Annotate
  • 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, string
6from autotest_lib.client.bin import test
7from autotest_lib.client.common_lib import error
8from autotest_lib.client.cros import login
9
10class platform_CryptohomeSyncStress(test.test):
11    version = 1
12
13    def run_once(self, username, password):
14        # log in. don't use UITest because it uses its own auth and
15        # DNS servers, and we need to do real login and chrome sync
16        login.attempt_login(username, password)
17
18        # make sure cryptohome is mounted
19        bus = dbus.SystemBus()
20        proxy = bus.get_object('org.chromium.Cryptohome',
21                               '/org/chromium/Cryptohome')
22        cryptohome = dbus.Interface(proxy, 'org.chromium.CryptohomeInterface')
23
24        ismounted = cryptohome.IsMounted()
25        if not ismounted:
26            raise error.TestFail('Cryptohome failed to mount.')
27
28        self.job.set_state('client_fail', False)
29