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