Home | History | Annotate | Download | only in enterprise_OnlineDemoMode
      1 # Copyright 2019 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 from autotest_lib.client.common_lib.cros import tpm_utils
      6 from autotest_lib.server import autotest
      7 from autotest_lib.server import test
      8 
      9 _CLIENT_TEST = 'enterprise_OnlineDemoModeEnrollment'
     10 
     11 class enterprise_OnlineDemoMode(test.test):
     12     """Enrolls to online demo mode."""
     13     version = 1
     14 
     15 
     16     def run_once(self, host):
     17         """Runs the client test and clears TPM owner on DUT after it's done."""
     18 
     19         client_at = autotest.Autotest(host)
     20         client_at.run_test(_CLIENT_TEST)
     21         client_at._check_client_test_result(host, _CLIENT_TEST)
     22 
     23         tpm_utils.ClearTPMOwnerRequest(host)