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