xref: /aosp_15_r20/external/autotest/server/site_tests/autoupdate_Basic/control.m2n.full.pin (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
1# Copyright 2021 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
5AUTHOR = "dhaddock, Chromium OS"
6NAME = "autoupdate_Basic.m2n.full.pin"
7TIME = "MEDIUM"
8PURPOSE = "Tests an M-to-N update with Nebraska using PIN login."
9TEST_CATEGORY = "Functional"
10TEST_CLASS = "platform"
11TEST_TYPE = "server"
12PY_VERSION = 3
13ATTRIBUTES = "suite:au-m2n"
14DOC = """
15This tests an M-to-N update. That means it will update from the current stable
16version for this board to ToT. This test will be used in the CQ to ensure
17changes don't break autoupdate.
18
19In the lab, a job_repo_url will be passed directly to the test. It contains
20information about the build to use and the IP address of lab cache server to
21download update payloads from. Local runs can use cache servers as well but
22the setup is fairly complicated. Instead, local test runs can specify the
23`running_at_desk` and `build` args to run without requiring special setup.
24
25Example usage:
26
27With lab cache server SSH access and a job_repo_url:
28test_that <DUT> autoupdate_Basic.m2n.full.pin --args="job_repo_url='http://<IP>:<port>/static/<board>-release/RXX-XXXX.X.X/autotest/packages'"
29
30Otherwise, the running_at_desk and build args are required:
31test_that <DUT> autoupdate_Basic.m2n.full.pin --board=<board> --args="running_at_desk=True build=R102-14643.0.0"
32
33"""
34
35from autotest_lib.client.common_lib import error
36from autotest_lib.client.common_lib import utils
37args_dict = utils.args_to_dict(args)
38
39def run(machine):
40    host = hosts.create_host(machine)
41    job.run_test('autoupdate_Basic', host=host, full_payload=True,
42    		 m2n=True, pin_login=True, **args_dict)
43
44job.parallel_simple(run, machines)
45