blob: 06e3c8ee19015f5e7e2d9ba335651e90c97edf24 [file] [log] [blame]
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from autotest_lib.client.common_lib import utils
AUTHOR = "Chromium OS"
NAME = "autoupdate_Rollback"
TEST_CATEGORY = "Functional"
TEST_CLASS = "platform"
TEST_TYPE = "server"
SUITE = "au"
'cc': [''],
'labels': ['Cr-Internals-Installer'],
DOC = """
This is a rollback test for Chrome OS releases. It first updates a machine and
then invokes rollback to boot from its previously booted partition. It tests
rollback using the update_engine_client rather than manipulating the UI.
Setup for this test is exactly like platform_RebootAfterUpdate. Namely:
job_repo_url: repo url to use to find image to update from -- assumes caller
has staged image. By default if host[repo_job_url] is set, it'll
use that. This overrides that value. This value must follow
the package_url_pattern in the global config.
To run locally:
1) Setup your devserver in your shadow config that your DUT can reach.
2) Start your devserver and stage the image you want for example:
artifacts=full_payload (and leave it on).
3) Run with test_that etc passing
For example:
test_that -b parrot --args="job_repo_url=http://<your_machine>:8080/static/\
parrot-release/R32-4793.0.0/autotest/packages" --fast \
<dut_ip> autoupdate_Rollback
args_dict = utils.args_to_dict(args)
job_repo_url = args_dict.get('job_repo_url')
def run_test(machine):
"""Execute a test configuration on a given machine."""
host = hosts.create_host(machine)
job.run_test("autoupdate_Rollback", host=host,
# Invoke parallel tests.
parallel_simple(run_test, machines)