blob: 9786930854f62462441351440a83ec4c6def4373 [file] [log] [blame]
# 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.
import os
from autotest_lib.server import utils
AUTHOR = 'Chrome OS Team'
NAME = 'fwupdate'
PURPOSE = 'Servo based firmware updater'
TIME = 'MEDIUM'
TEST_TYPE = 'server'
DOC = """
This test attempts to reprogram both EC and AP firmware.
Requires one parameter passed through args: 'fwurl', a string representing the
firmware tarball URL on Google storage.
"""
args_dict = utils.args_to_dict(args)
servo_args = hosts.SiteHost.get_servo_arguments(args_dict)
def run_fwupdate(machine):
host = hosts.create_host(machine, servo_args=servo_args)
# TODO(vbendeb): both board type and tarball url need to be provided in
# both cases, when when invoked through the command line and by the
# scheduler. Right now only command line invocation is supported.
# (http://crosbug.com/37148)
job.run_test('fwupdate', servo=host.servo, board=args_dict['board'],
fwurl=args_dict['fwurl'])
parallel_simple(run_fwupdate, machines)