aboutsummaryrefslogtreecommitdiff
path: root/server/site_tests/provision_CheetsUpdate/control
blob: 0b4dc791897bc14b7496b65a3a38a26c842a44b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

AUTHOR = 'ARC Team'
NAME = 'provision_CheetsUpdate'
ATTRIBUTES = ''
DEPENDENCIES = 'arc'
TEST_TYPE = 'server'
TIME = 'LENGTHY'
PY_VERSION = 3

DOC = """This test downloads and installs an Android test image on the DUT to
prepare the DUT for Android PFQ tests.

This test expects android build full name as a local env variable |value| or
part of the test args.
e.g.
--args='value=git_nyc-arc/cheets_x86-user/3512523'
--args='value=git_nyc-arc/cheets_arm-user/P3512523'

This test expects test servers are equipped with ssh keys to talk to lab DUTs
without entering password while copying Android test image on DUTs.
"""

from autotest_lib.client.common_lib import error, utils

# Autoserv may inject a local variable called value to supply the desired
# version. If it does not exist, check if it was supplied as a test arg.


if not locals().get('value'):
    args = utils.args_to_dict(args)
    if not args.get('value'):
        raise error.TestError('No provision value!')
    value = args['value']


def run(machine):
    host = hosts.create_host(machine)
    job.run_test('provision_CheetsUpdate', host=host, value=value)

parallel_simple(run, machines)