• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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"
13SUITE = "factory"
14TIME = "LONG"
15TEST_CATEGORY = "Functional"
16TEST_TYPE = "server"
17
18DOC = """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.
26args_dict = utils.args_to_dict(args)
27test_list_path = args_dict.get('test_list_path', '')
28test_list_name = args_dict.get('test_list_name')
29
30def 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
42parallel_simple(run, machines)
43