1 # Copyright 2015 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.client.common_lib import utils 6 7 AUTHOR = 'sbasi' 8 NAME = 'brillo_Gtests' 9 TIME = 'MEDIUM' 10 TEST_TYPE = 'Server' 11 12 DOC = """ 13 This test runs all the native gTests found on a Brillo DUT. 14 15 Usage: --args='whitelist=True' # Only run whitelisted tests. 16 --args='filter="*glob* *test*"' # Only run tests matching the globs. 17 --args='tests="/test /another"' # Add specific tests to the list. 18 """ 19 20 args_dict = utils.args_to_dict(args) 21 22 def run(machine): 23 use_whitelist = args_dict.pop('whitelist', None) 24 filter_tests = args_dict.pop('filter', '').split() 25 native_tests = args_dict.pop('tests', '').split() 26 if args_dict: 27 raise error.AutoservError('unknown args: %r' % args_dict) 28 job.run_test('brillo_Gtests', host=hosts.create_host(machine), 29 use_whitelist=use_whitelist, filter_tests=filter_tests, 30 native_tests=native_tests) 31 32 33 parallel_simple(run, machines) 34