1# Copyright 2015 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 hosts 9from autotest_lib.server import test 10 11 12class stress_ClientTestReboot(test.test): 13 """Reboot a device.""" 14 version = 1 15 16 def run_once(self, client_ip, testname, loops): 17 host = hosts.create_host(client_ip) 18 autotest_client = autotest.Autotest(host) 19 for i in xrange(loops): 20 logging.debug('Starting loop #%d', i) 21 autotest_client.run_test(testname) 22 host.reboot() 23