xref: /aosp_15_r20/external/autotest/server/site_tests/pvs_Sequence/control.ExampleSequence (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
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
5AUTHOR = "ChromeOS PVS Team"
6NAME = "pvs_Sequence.ExampleSequence"
7PURPOSE = "stub_Pass and PassServer, instrumented as a basic sequence example"
8CRITERIA = "This test is a benchmark."
9TIME = "SHORT"
10TEST_CATEGORY = "Benchmark"
11TEST_CLASS = "pvs"
12TEST_TYPE = "server"
13ATTRIBUTES = ""
14PY_VERSION = 3
15DOC = """
16This is an example sequence, showing how to use the pvs_Sequence test class to
17standardize sequence implementation in control files. When creating a new
18sequence, start from this example implementation and:
19
20(1) Make sure your NAME is in the form 'pvs_Sequence.<sequence-name>'
21(2) Fill the SEQUENCE data structure below as the fields are indicated
22"""
23
24from autotest_lib.server import utils
25
26args_dict = utils.args_to_dict(args)
27servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
28
29# Fill this list with tuples of (<test-name>, <args_dict>, <is_server_test>)
30SEQUENCE = [
31    ("stub_PassServer", {}, True),
32    ("stub_Pass",       {}, False)
33]
34
35def run(machine):
36    # Setup the client machine.
37    host = hosts.create_host(machine, servo_args=servo_args)
38
39    # run the pvs_Sequence wrapper, with the input of the SEQUENCE
40    # defined above
41    job.run_test("pvs_Sequence",
42                           tag=NAME.split('.')[1],
43                           host=host,
44                           sequence=SEQUENCE)
45
46parallel_simple(run, machines)