1# Copyright (c) 2013 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 5import logging 6 7from autotest_lib.client.common_lib import error 8from autotest_lib.client.common_lib import utils 9 10NAME = "factory_Basic" 11AUTHOR = "beeps@google.com, chromeos-test@google.com" 12ATTRIBUTES = "suite:factory" 13TIME = "LONG" 14TEST_CATEGORY = "Functional" 15TEST_TYPE = "server" 16 17DOC = """Basic factory tests.""" 18 19# Set these variables to the path of a test list reachable within the chroot 20# and the name of the test list respectively. If the test list is already on 21# the DUT you don't need a test_list_path.Eg of a local test_list_path:/home/\ 22# <username>/trunk/src/third_party/autotest/files/server/site_tests/\ 23# factory_Basic/test_list.suspend_basic, for which the test_list_name 24# is suspend_basic. 25args_dict = utils.args_to_dict(args) 26test_list_path = args_dict.get('test_list_path', '') 27test_list_name = args_dict.get('test_list_name') 28 29def run(machine): 30 if test_list_name: 31 host = hosts.create_host(machine) 32 job.run_test("factory_Basic", host=host, disable_sysinfo=True, 33 test_list_name=test_list_name, 34 test_list_path=test_list_path) 35 else: 36 raise error.AutoservError('Please specify --args="test_list_path=<path ' 37 'to test list> test_list_name=<name of test list>" ' 38 'when invoking test_that. If your test_list is already ' 39 'on the DUT, just the test_list_name will suffice.') 40 41parallel_simple(run, machines) 42