| # Copyright 2020 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| AUTHOR = "dhaddock, ChromiumOS" |
| NAME = "autoupdate_Basic.delta" |
| METADATA = { |
| "contacts": [ |
| "chromeos-core-services@google.com", |
| "chromeos-sw-engprod@google.com" |
| ], |
| "bug_component": "b:908319", |
| "criteria": "Tests an N-to-N update and user login between versions." |
| } |
| TIME = "MEDIUM" |
| TEST_TYPE = "server" |
| ATTRIBUTES = "suite:au-perbuild" |
| DOC = """ |
| This tests an N-to-N update. That means it will update to the same version |
| that the DUT was provisioned with. This test will be used in the CQ to ensure |
| changes don't break autoupdate. |
| |
| In the lab, a job_repo_url will be passed directly to the test. It contains |
| information about the build to use and the IP address of lab cache server to |
| download update payloads from. |
| |
| When running the test from your workstation, the source of update payloads |
| differs depending on where the DUT is located/what network it is on: |
| |
| 1. DUT is in the CrOS lab or connected physically to the lab network. |
| - Payloads by default will be retrieved from a static caching server in the |
| lab. |
| 2. DUT is at your desk and NOT connected to the CrOS lab network. |
| - Payloads will be retrieved from a public GS bucket in this case. |
| |
| The test will automatically determine which situation you are in, but you can |
| use the "running_at_desk=True" arg if you wish to force the public bucket flow. |
| |
| |
| Example usage: |
| |
| test_that <DUT> autoupdate_Basic.delta --board=<board> |
| - Payload origin will be automatically determined based on the DUTs network. |
| - Version currently on the DUT will be used as the update's target version. |
| |
| test_that <DUT> autoupdate_Basic.delta --board=<board> --args="build=R102-14643.0.0" |
| - Payload origin will be automatically determined based on the DUTs network. |
| - R102-14643.0.0 will be used as the update's target version. |
| |
| test_that <DUT> autoupdate_Basic.delta --board=<board> --args="running_at_desk=True" |
| - Public GS bucket will be used. |
| - Version currently on the DUT will be used as the update's target version. |
| |
| """ |
| |
| from autotest_lib.client.common_lib import utils |
| args_dict = utils.args_to_dict(args) |
| |
| def run(machine): |
| host = hosts.create_host(machine) |
| job.run_test('autoupdate_Basic', host=host, full_payload=False, |
| **args_dict) |
| |
| job.parallel_simple(run, machines) |