xref: /aosp_15_r20/external/autotest/server/site_tests/autoupdate_Rollback/control (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
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 = "Chromium OS"
8NAME = "autoupdate_Rollback"
9TIME = "MEDIUM"
10TEST_CATEGORY = "Functional"
11TEST_CLASS = "platform"
12TEST_TYPE = "server"
13ATTRIBUTES = "suite:bvt-installer, suite:satlab-qual-bvt-installer"
14PY_VERSION = 3
15
16DOC = """
17This is a rollback test for ChromeOS releases. It first updates a machine and
18then invokes rollback to boot from its previously booted partition. It tests
19rollback using the update_engine_client rather than manipulating the UI.
20
21To run locally:
22  1) Lease a DUT in the lab
23  2) Edit your shadow_config.ini to point to a devserver that the leased DUT can reach.
24  3) Run with test_that passing job_repo_url
25
26For example:
27
28test_that <dut_ip> autoupdate_Rollback --args="job_repo_url='http://<IP>:<port>/static/<board>-release/RXX-XXXX.X.X/autotest/packages'"
29
30"""
31
32args_dict = utils.args_to_dict(args)
33job_repo_url = args_dict.get('job_repo_url')
34
35
36def run_test(machine):
37    """Execute a test configuration on a given machine."""
38    host = hosts.create_host(machine)
39    job.run_test("autoupdate_Rollback", host=host,
40                 job_repo_url=job_repo_url)
41
42
43# Invoke parallel tests.
44parallel_simple(run_test, machines)
45