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 6AUTHOR = "chromeos-lab-infrastructure" 7NAME = "provision_Cr50Update" 8PURPOSE = "Provision a system to the correct firmware version." 9TIME = "MEDIUM" 10TEST_CATEGORY = "System" 11TEST_CLASS = "provision" 12TEST_TYPE = "Server" 13DEPENDENCIES = "servo_state:WORKING,cr50-ro-keyid:prod" 14 15DOC = """ 16This is a test used by the provision control segment in autoserv to set the 17cr50-version label of a host to the desired setting. This test attempts to 18reprogram the cr50 firmware and set the cr50 chip board id. Use the args 19from Cr50Test to specify the release image: release_ver, release_path, or 20the version saved in chromeos_cr50-QUAL_VERSION. 21 22@param release_path: local path to release image 23@param release_ver: release version 'RW/BID' 24@param cr50_dbg_image_path: local path to DBG image 25""" 26 27from autotest_lib.client.common_lib import utils 28 29if 'args_dict' not in locals(): 30 args_dict = {} 31 32args_dict.update(utils.args_to_dict(args)) 33servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 34 35def run(machine): 36 host = hosts.create_host(machine, servo_args=servo_args) 37 job.run_test('provision_Cr50Update', host=host, cmdline_args=args, 38 full_args=args_dict) 39 40job.parallel_simple(run, machines) 41