| # Copyright 2022 The ChromiumOS Authors |
| # 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 |
| |
| NAME = 'tast.generic-list' |
| TEST_TYPE = 'Server' |
| # This test belongs to no suite; it is intended mainly for manual invocation |
| # via test_that. |
| MAX_RESULT_SIZE_KB = 256 * 1024 |
| |
| # tast.py uses binaries installed from autotest_server_package.tar.bz2. |
| REQUIRE_SSP = True |
| |
| METADATA = { |
| 'contacts': ['chromeos-pvs-eng@google.com'], |
| 'bug_component': 'b:1110659', # ChromeOS > Platform > Enablement > PVS Framework |
| 'criteria': 'Run arbitrary Tast tests in a comma seperated list', |
| } |
| |
| # 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): |
| HOUR = 60 * 60 |
| args_dict = utils.args_to_dict(command_args) |
| servo_args = hosts.CrosHost.get_servo_arguments(args_dict) |
| 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, servo_args=servo_args), |
| test_exprs=expr, |
| ignore_test_failures=True, max_run_sec=36*HOUR, |
| command_args=command_args, |
| varslist=varslist, |
| exclude_missing=True, |
| report_skipped=True, |
| ephemeraldevserver='false', |
| clear_tpm=False) |
| |
| parallel_simple(run, machines) |