1# Copyright 2022 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# This tests will only run in the CFT/F20 environment. 6 7from autotest_lib.client.common_lib import error 8from autotest_lib.client.common_lib import utils 9from autotest_lib.server.site_tests.tast import tast 10 11AUTHOR = 'Chromium OS team' 12NAME = 'tast.dutserver' 13TIME = 'MEDIUM' 14TEST_TYPE = 'Server' 15# This test belongs to no suite; it is intended mainly for manual invocation 16# via test_that. 17ATTRIBUTES = '' 18MAX_RESULT_SIZE_KB = 256 * 1024 19PY_VERSION = 3 20 21DOC = ''' 22Run arbitrary Tast tests. 23 24Tast is an integration-testing framework analagous to the test-running portion 25of Autotest. See https://chromium.googlesource.com/chromiumos/platform/tast/ for 26more information. 27 28This test runs arbitary Tast-based tests specified by args given to test_that. 29This test might be useful on debugging to simulate Tast test runs invoked via 30Autotest. 31 32Examples: 33 test_that --dut_servers=${DUTSERVER} ${DUT} tast.dutserver 34''' 35 36command_args, varslist = tast.split_arguments(args) 37 38def run(machine): 39 args_dict = utils.args_to_dict(command_args) 40 varslist.append('servers.dut=:%s' % dut_servers[0]) 41 job.run_test('tast', 42 host=hosts.create_host(machine), 43 ignore_test_failures=False, max_run_sec=3600, 44 test_exprs=['meta.LocalPass'], 45 command_args=command_args, 46 varslist=varslist, 47 is_cft=is_cft) 48 49parallel_simple(run, machines) 50