• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2018 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
5
6import logging
7
8from autotest_lib.client.common_lib import error
9from autotest_lib.client.common_lib.cros import pinweaver_client
10from autotest_lib.server import autotest
11from autotest_lib.server import test
12
13
14class platform_CryptohomeLECredentialManagerServer(test.test):
15    """Tests the le_credential_manager functionality of cryptohome.
16    """
17
18    version = 1
19
20    def run_once(self, host):
21        """Runs the platform_CryptohomeLECredentialManager test across a reboot.
22        """
23        try:
24            pinweaver_client.GetLog(host)
25        except pinweaver_client.PinWeaverNotAvailableError:
26            logging.info('PinWeaver not supported!')
27            raise error.TestNAError('PinWeaver is not available')
28
29        autotest.Autotest(host).run_test(
30            'platform_CryptohomeLECredentialManager', pre_reboot=True,
31            check_client_result=True)
32
33        host.reboot()
34
35        autotest.Autotest(host).run_test(
36            'platform_CryptohomeLECredentialManager', pre_reboot=False,
37            check_client_result=True)
38
39        logging.info('Tests passed!')
40