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
5import logging
6
7from autotest_lib.server import autotest
8from autotest_lib.server import test
9
10
11class stress_EnrollmentRetainment(test.test):
12    """Used to kick off policy_EnrollmentRetainment test."""
13    version = 1
14
15
16    def run_once(self, client_test, host, loops):
17        """
18        Starting point of this test.
19
20        @param client_test: the name of the Client test to run.
21        @param host: the host machine running the test.
22        @param loops: how many times to loop the test.
23
24        """
25        self.autotest_client = autotest.Autotest(host)
26
27        for i in xrange(loops):
28            logging.info('Starting loop #%d', i)
29            self.autotest_client.run_test(
30                client_test, check_client_result=True)
31            host.reboot()
32