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' 11 12DOC = """This test downloads and installs an Android test image on the DUT to 13prepare the DUT for Android PFQ tests. 14 15This test expects android build full name as a local env variable |value| or 16part of the test args. 17e.g. 18--args='value=git_nyc-arc/cheets_x86-user/3512523' 19--args='value=git_nyc-arc/cheets_arm-user/P3512523' 20 21This test expects test servers are equipped with ssh keys to talk to lab DUTs 22without entering password while copying Android test image on DUTs. 23""" 24 25from 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 31if 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 38def run(machine): 39 host = hosts.create_host(machine) 40 job.run_test('provision_CheetsUpdate', host=host, value=value) 41 42parallel_simple(run, machines) 43