xref: /aosp_15_r20/external/autotest/server/site_tests/tast/control.runtime-probe (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
1# Copyright 2018 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
5AUTHOR = 'Chromium OS team'
6NAME = 'tast.runtime-probe'
7TIME = 'MEDIUM'
8TEST_TYPE = 'Server'
9ATTRIBUTES = 'suite:runtime_probe_perbuild'
10PY_VERSION = 3
11
12# tast.py uses binaries installed from autotest_server_package.tar.bz2.
13REQUIRE_SSP = True
14
15DOC = '''
16Run runtime-probe tests.
17
18Tast is an integration-testing framework analagous to the test-running portion
19of Autotest. See https://chromium.googlesource.com/chromiumos/platform/tast/ for
20more information.
21
22This test runs runtime-probe Tast test.
23'''
24import json
25import tempfile
26import yaml
27
28def run(machine):
29    host = hosts.create_host(machine)
30    with tempfile.NamedTemporaryFile(suffix='.yaml', mode='w') as temp_file:
31        host_info = host.host_info_store.get()
32        yaml.safe_dump({'autotest_host_info_labels':
33                        json.dumps(host_info.labels)}, stream=temp_file)
34        temp_file.flush()
35        job.run_test('tast',
36                     host=host,
37                     test_exprs=['("group:runtime_probe")'],
38                     command_args=args,
39                     varsfiles=[temp_file.name])
40
41parallel_simple(run, machines)
42