Home | History | Annotate | Download | only in firmware_ShellBall
      1 # Copyright (c) 2010 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.server import utils
      6 
      7 AUTHOR = "Chrome OS Team"
      8 NAME = "firmware_ShellBall"
      9 TIME = "SHORT"
     10 TEST_CATEGORY = "Functional"
     11 TEST_CLASS = "firmware"
     12 TEST_TYPE = "server"
     13 
     14 DOC = """
     15 chromeos-firmwareupdate functional testing.
     16 
     17 This script first copies shellball to DUT and runs all functional tests.
     18 
     19 Syntax:
     20    ./test_that --board=<BOARD> <IP> -a "xml_config=<xml_config_file>
     21    shellball_path=<shellball_directory> shellball_name=<shellball_name>
     22    servo_serial=<serial number>" firmware_ShellBall/control
     23 """
     24 from autotest_lib.client.common_lib import error
     25 
     26 # Convert autoserv args to something usable.
     27 opts = dict([[k, v] for (k, _, v) in [x.partition('=') for x in args]])
     28 
     29 args_dict = utils.args_to_dict(args)
     30 servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
     31 
     32 def run_shellball(machine):
     33     # Verify bios path arg.
     34     if 'shellball_path' and 'shellball_name' not in opts:
     35         raise error.TestFail('Invalid shellball information.')
     36     # Setup the client machine.
     37     host = hosts.create_host(machine, servo_args=servo_args)
     38     job.run_test("firmware_ShellBall", host=host,
     39                  cmdline_args=args,
     40                  shellball_path=opts['shellball_path'],
     41                  shellball_name=opts['shellball_name'],
     42                  disable_sysinfo=True)
     43 
     44 parallel_simple(run_shellball, machines)
     45