xref: /aosp_15_r20/external/autotest/server/site_tests/tast/control.cellular-ota-pinlock-unstable (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 = 'Chromium OS team'
6NAME = 'tast.cellular-ota-pinlock-unstable'
7TIME = 'MEDIUM'
8TEST_TYPE = 'Server'
9ATTRIBUTES = 'suite:cellular_ota_flaky'
10MAX_RESULT_SIZE_KB = 1024 * 1024
11PY_VERSION = 3
12DEPENDENCIES = "carrier:multisim"
13
14# tast.py uses binaries installed from autotest_server_package.tar.bz2.
15REQUIRE_SSP = True
16
17DOC = '''
18Run the unstable Tast tests which verify Cellular sim pin & puk lock functionality.
19
20"group:cellular": indicates that the test runs on DUTs with a Cellular modem.
21"cellular_sim_pinlock": indicates that the test runs on DUTs with a Cellular
22modem and SIM with pin & puk codes.
23"cellular_unstable": Unstable tests that will be run as part of the flaky suite
24
25Tast is an integration-testing framework analagous to the test-running portion
26of Autotest. See https://chromium.googlesource.com/chromiumos/platform/tast/ for
27more information.
28
29See http://go/tast-failures for information about investigating failures.
30'''
31import json
32import tempfile
33import yaml
34
35def run(machine):
36    host = hosts.create_host(machine)
37    with tempfile.NamedTemporaryFile(suffix='.yaml', mode='w') as temp_file:
38        host_info = host.host_info_store.get()
39        yaml.safe_dump({'autotest_host_info_labels':
40                        json.dumps(host_info.labels)}, stream=temp_file)
41        temp_file.flush()
42    job.run_test('tast',
43                 host=host,
44                 test_exprs=['("group:cellular" && "cellular_sim_pinlock" && "cellular_unstable")'],
45                 ignore_test_failures=True, max_run_sec=10800,
46                 command_args=args,
47                 varsfiles=[temp_file.name])
48
49parallel_simple(run, machines)
50