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 """Test body.""" 18 19 host = hosts.create_host(client_ip) 20 autotest_client = autotest.Autotest(host) 21 for i in xrange(loops): 22 logging.debug('Starting loop #%d', i) 23 autotest_client.run_test(testname, check_client_result=True) 24 host.reboot() 25