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 TIME = "LONG" 14 TEST_CATEGORY = "Functional" 15 TEST_TYPE = "server" 16 17 DOC = """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. 25 args_dict = utils.args_to_dict(args) 26 test_list_path = args_dict.get('test_list_path', '') 27 test_list_name = args_dict.get('test_list_name') 28 29 def 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 41 parallel_simple(run, machines) 42