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 5from autotest_lib.client.common_lib import utils 6 7AUTHOR = 'sbasi' 8NAME = 'brillo_Gtests' 9TIME = 'MEDIUM' 10TEST_TYPE = 'Server' 11 12DOC = """ 13This test runs all the native gTests found on a Brillo DUT. 14 15Usage: --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 20args_dict = utils.args_to_dict(args) 21 22def 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 33parallel_simple(run, machines) 34