Home | History | Annotate | Download | only in stress_ClientTestReboot
      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 
      5 import logging
      6 
      7 from autotest_lib.server import autotest
      8 from autotest_lib.server import hosts
      9 from autotest_lib.server import test
     10 
     11 
     12 class 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