Home | History | Annotate | Download | only in platform_RebootAfterUpdate
      1 # Copyright (c) 2013 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 import utils
      6 
      7 AUTHOR = "sosa (a] chromium.org"
      8 NAME = "platform_RebootAfterUpdate"
      9 TIME = "SHORT"
     10 TEST_CATEGORY = "Benchmark"
     11 TEST_CLASS = "platform"
     12 TEST_TYPE = "server"
     13 ATTRIBUTES = "suite:experimental"
     14 SUITE = "experimental"
     15 
     16 DOC = """
     17 This test checks the behavior of reboot after update. It specifically tests
     18 the amount of time it takes for a system to reboot both after an update and
     19 after first login.
     20 
     21 Arg:
     22   job_repo_url: repo url to use to find image to update from -- assumes caller
     23                 has staged image. By default if host[repo_job_url] is set, it'll
     24                 use that. This overrides that value. This value must follow
     25                 the package_url_pattern in the global config.
     26 
     27 To run locally:
     28   1) Setup your devserver in your shadow config that your DUT can reach.
     29   2) Stage the image you want for example:
     30      http://localhost:8080/download?archive_url=\
     31      gs://chromeos-image-archive/x86-alex/R29-4165.0.0
     32   3) Run with test_that etc passing
     33      args="job_repo_url=http://<your_hostname>:8080/static/\
     34      x86-alex/R29-4165.0.0/autotest/packages"
     35 """
     36 
     37 args_dict = utils.args_to_dict(args)
     38 job_repo_url = args_dict.get('job_repo_url')
     39 
     40 def run_test(machine):
     41     """Execute a test configuration on a given machine."""
     42     host = hosts.create_host(machine)
     43     job.run_test("platform_RebootAfterUpdate",
     44                  host=host, job_repo_url=job_repo_url)
     45 
     46 
     47 # Invoke parallel tests.
     48 parallel_simple(run_test, machines)
     49