blob: 3ea0a2e699760dd225f467f55017a32926ff9de5 [file] [log] [blame]
# Copyright 2022 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 error
from autotest_lib.client.common_lib import utils
from autotest_lib.server.site_tests.tast import tast
AUTHOR = 'Chromium OS team'
NAME = 'tast.generic-list'
TIME = 'MEDIUM'
TEST_TYPE = 'Server'
# This test belongs to no suite; it is intended mainly for manual invocation
# via test_that.
ATTRIBUTES = ''
MAX_RESULT_SIZE_KB = 256 * 1024
PY_VERSION = 3
# tast.py uses binaries installed from autotest_server_package.tar.bz2.
REQUIRE_SSP = True
DOC = '''
Run arbitrary Tast tests in a comma seperated list
Tast is an integration-testing framework analagous to the test-running portion
of Autotest. See https://chromium.googlesource.com/chromiumos/platform/tast/ for
more information.
This test runs arbitary Tast-based tests specified by args given to test_that.
This test might be useful on debugging to simulate Tast test runs invoked via
Autotest. Tests run with this wrapper will report skipped tests using the
autotest TEST NA status.
Examples:
test_that --args=tast_list=tast.test_1,tast.test_2 ${DUT} tast.generic_list
'''
command_args, varslist = tast.split_arguments(args)
def run(machine):
args_dict = utils.args_to_dict(command_args)
try:
tast_list = args_dict['tast_list']
except KeyError:
raise error.TestFail(
'Attribute expression is unspecified; set --args=tast_list=...')
expr = tast_list.split(',')
job.run_test('tast',
host=hosts.create_host(machine),
test_exprs=expr,
ignore_test_failures=True, max_run_sec=3600,
command_args=command_args,
varslist=varslist,
exclude_missing=True,
report_skipped=True)
parallel_simple(run, machines)