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