# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

from autotest_lib.client.common_lib import utils

AUTHOR = "ChromeOS Team"
NAME = "platform_StageAndRecover"
TIME = "MEDIUM"
TEST_CATEGORY = "Install"
TEST_CLASS = "platform"
TEST_TYPE = "server"
DEPENDENCIES = "servo_state:WORKING"
ATTRIBUTES = "suite:platform_test"
PY_VERSION = 3

DOC = """
This test stages and installs the same build recovery image onto a
servo-connected DUT. This is useful for testing the recovery process,
imaging servo-connected Devices under Test (DUTs), and verifying recovery
build image is installed.
"""

args_dict = utils.args_to_dict(args)
servo_args = hosts.CrosHost.get_servo_arguments(args_dict)

def run(machine):
    # Setup the client machine.
    host = hosts.create_host(machine, servo_args=servo_args)
    job.run_test("platform_StageAndRecover", host=host,
                 disable_sysinfo=True)

parallel_simple(run, machines)
