# Copyright 2017 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.server import utils

AUTHOR = "mruthven"
NAME = "firmware_Cr50UpdateScriptStress"
PURPOSE = "Verify cr50-update"
ATTRIBUTES = "suite:faft_cr50_pvt, suite:faft_cr50_prepvt"
TIME = "LONG"
TEST_TYPE = "server"
DEPENDENCIES = "servo_state:WORKING"

DOC = """
This test clears the cr50 update state and reboots the device many times
to verify that the cr50 update is reliable.
"""

if 'args_dict' not in locals():
    args_dict = {}

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

def run(machine):
    host = hosts.create_host(machine, servo_args=servo_args)

    iterations = int(args_dict.get("iterations", 10))

    job.run_test("firmware_Cr50UpdateScriptStress", host=host,
                 cmdline_args=args, full_args=args_dict, iterations=iterations)

parallel_simple(run, machines)
