blob: 815b2130cc61d89a64c8abb0f651068d4aefefcb [file] [log] [blame]
# Copyright 2015 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from autotest_lib.client.common_lib import utils
AUTHOR = 'sbasi'
NAME = 'brillo_Gtests'
TEST_TYPE = 'Server'
DOC = """
This test runs all the native gTests found on a Brillo DUT.
Usage: --args='whitelist=True' # Only run whitelisted tests.
--args='filter="*glob* *test*"' # Only run tests matching the globs.
--args='tests="/test /another"' # Add specific tests to the list.
args_dict = utils.args_to_dict(args)
def run(machine):
use_whitelist = args_dict.pop('whitelist', None)
filter_tests = args_dict.pop('filter', '').split()
native_tests = args_dict.pop('tests', '').split()
if args_dict:
raise error.AutoservError('unknown args: %r' % args_dict)
job.run_test('brillo_Gtests', host=hosts.create_host(machine),
use_whitelist=use_whitelist, filter_tests=filter_tests,
parallel_simple(run, machines)