xref: /aosp_15_r20/external/autotest/server/site_tests/provision_CheetsUpdate/control (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
1# Copyright 2017 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 = 'ARC Team'
6NAME = 'provision_CheetsUpdate'
7ATTRIBUTES = ''
8DEPENDENCIES = 'arc'
9TEST_TYPE = 'server'
10TIME = 'LENGTHY'
11PY_VERSION = 3
12
13DOC = """This test downloads and installs an Android test image on the DUT to
14prepare the DUT for Android PFQ tests.
15
16This test expects android build full name as a local env variable |value| or
17part of the test args.
18e.g.
19--args='value=git_nyc-arc/cheets_x86-user/3512523'
20--args='value=git_nyc-arc/cheets_arm-user/P3512523'
21
22This test expects test servers are equipped with ssh keys to talk to lab DUTs
23without entering password while copying Android test image on DUTs.
24"""
25
26from autotest_lib.client.common_lib import error, utils
27
28# Autoserv may inject a local variable called value to supply the desired
29# version. If it does not exist, check if it was supplied as a test arg.
30
31
32if not locals().get('value'):
33    args = utils.args_to_dict(args)
34    if not args.get('value'):
35        raise error.TestError('No provision value!')
36    value = args['value']
37
38
39def run(machine):
40    host = hosts.create_host(machine)
41    job.run_test('provision_CheetsUpdate', host=host, value=value)
42
43parallel_simple(run, machines)
44