• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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"
14
15DOC = """
16This test checks the behavior of reboot after update. It specifically tests
17the amount of time it takes for a system to reboot both after an update and
18after first login.
19
20Arg:
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
26To 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
36args_dict = utils.args_to_dict(args)
37job_repo_url = args_dict.get('job_repo_url')
38
39def 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.
47parallel_simple(run_test, machines)
48