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 5from autotest_lib.client.common_lib import utils 6 7AUTHOR = "sosa@chromium.org" 8NAME = "platform_RebootAfterUpdate" 9TIME = "SHORT" 10TEST_CATEGORY = "Benchmark" 11TEST_CLASS = "platform" 12TEST_TYPE = "server" 13ATTRIBUTES = "suite:experimental" 14SUITE = "experimental" 15 16DOC = """ 17This test checks the behavior of reboot after update. It specifically tests 18the amount of time it takes for a system to reboot both after an update and 19after first login. 20 21Arg: 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 27To 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 37args_dict = utils.args_to_dict(args) 38job_repo_url = args_dict.get('job_repo_url') 39 40def 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. 48parallel_simple(run_test, machines) 49