1# Copyright (c) 2012 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 5from autotest_lib.client.common_lib import utils 6 7AUTHOR = "Chrome OS Team" 8NAME = "platform_InstallRecoveryImage" 9TIME = "MEDIUM" 10TEST_CATEGORY = "Install" 11TEST_CLASS = "platform" 12TEST_TYPE = "server" 13 14DOC = """ 15This test installs a specified recovery image onto a servo-connected DUT. 16This is useful for testing the recovery process and imaging servo-connected 17Devices under Test (DUTs). 18Here is the command to install a recovery image; 19test_that --args='image=<recovery_image_path_on_host>' 20 --board=<board name> 21 <IP addres> 22 platform_InstallRecoveryImage 23""" 24 25args_dict = utils.args_to_dict(args) 26image = args_dict.get('image', None) 27servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 28 29def run(machine): 30 # Setup the client machine. 31 host = hosts.create_host(machine, servo_args=servo_args) 32 job.run_test("platform_InstallRecoveryImage", host=host, 33 disable_sysinfo=True, image=image) 34 35parallel_simple(run, machines) 36