1# Copyright 2022 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 5import logging 6from autotest_lib.client.common_lib import error 7from autotest_lib.client.common_lib import utils 8 9AUTHOR = "kyleshima, Chromium OS" 10NAME = "autoupdate_EndToEndTest.m2n.full" 11TIME = "MEDIUM" 12TEST_CATEGORY = "Functional" 13TEST_CLASS = "platform" 14TEST_TYPE = "server" 15PY_VERSION = 3 16ATTRIBUTES = "suite:au-m2n" 17JOB_RETRIES = 2 18 19DOC = """ 20This tests an M-to-N update. That means it will update from the current stable 21version for this board to ToT. autoupdate_EndToEndTest runs as part of paygen 22and is kicked off differently from other tests. autoupdateEndToEndTest.m2n.full 23will run the same as the other autoupdate tests, so we can detect any 24differences between the two test environments and catch test-breaking changes 25earlier. 26 27M2N tests require lab cache server access to provision the source stable build, 28so they are not easy to run locally. 29 30You need to enable SSH access to the lab cache servers to run this test. 31Refer to the setup instructions here: 32https://g3doc.corp.google.com/company/teams/chrome/ops/fleet/software/onboarding/creating-work-env.md#devserver-environment-for-running-local-tests-with-lab-duts 33 34A quick way to find active image caching servers (devservers) to add to 35shadow_config.ini is to search for "job_repo_url" in the logs of autoupdate 36tests running in the lab. You can use those IP addresses as valid image caching 37servers. See go/cros-au-tests for quick access to test results and logs. 38 39Example usage: 40 41# The target update will be the currently provisioned version on the DUT. 42test_that <DUT> autoupdate_EndToEndTest.m2n.full 43 44# The target update will be the build specified in the args. 45test_that <DUT> autoupdate_EndToEndTest.m2n.full --args="build=R102-14692.0.0" 46 47""" 48 49from autotest_lib.client.common_lib import utils 50args_dict = utils.args_to_dict(args) 51 52def run(machine): 53 host = hosts.create_host(machine) 54 job.run_test('autoupdate_EndToEndTest', host=host, test_conf=None, 55 m2n=True, **args_dict) 56 57job.parallel_simple(run, machines) 58