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