1*9c5db199SXin Li# Copyright 2022 The Chromium OS Authors. All rights reserved. 2*9c5db199SXin Li# Use of this source code is governed by a BSD-style license that can be 3*9c5db199SXin Li# found in the LICENSE file. 4*9c5db199SXin Li 5*9c5db199SXin LiAUTHOR = 'Chromium OS team' 6*9c5db199SXin LiNAME = 'tast.cellular-ota-pinlock-stable' 7*9c5db199SXin LiTIME = 'MEDIUM' 8*9c5db199SXin LiTEST_TYPE = 'Server' 9*9c5db199SXin LiATTRIBUTES = 'suite:cellular_ota' 10*9c5db199SXin LiMAX_RESULT_SIZE_KB = 1024 * 1024 11*9c5db199SXin LiPY_VERSION = 3 12*9c5db199SXin LiDEPENDENCIES = "carrier:multisim" 13*9c5db199SXin Li 14*9c5db199SXin Li# tast.py uses binaries installed from autotest_server_package.tar.bz2. 15*9c5db199SXin LiREQUIRE_SSP = True 16*9c5db199SXin Li 17*9c5db199SXin LiDOC = ''' 18*9c5db199SXin LiRun the stable Tast tests which verify Cellular sim pin & puk lock functionality. 19*9c5db199SXin Li 20*9c5db199SXin Li"group:cellular": indicates that the test runs on DUTs with a Cellular modem. 21*9c5db199SXin Li"cellular_sim_pinlock": indicates that the test runs on DUTs with a Cellular 22*9c5db199SXin Limodem and SIM with pin & puk codes. 23*9c5db199SXin Li"cellular_unstable": Unstable tests that will be excluded from the stable suite. 24*9c5db199SXin Li 25*9c5db199SXin LiTast is an integration-testing framework analagous to the test-running portion 26*9c5db199SXin Liof Autotest. See https://chromium.googlesource.com/chromiumos/platform/tast/ for 27*9c5db199SXin Limore information. 28*9c5db199SXin Li 29*9c5db199SXin LiSee http://go/tast-failures for information about investigating failures. 30*9c5db199SXin Li''' 31*9c5db199SXin Liimport json 32*9c5db199SXin Liimport tempfile 33*9c5db199SXin Liimport yaml 34*9c5db199SXin Li 35*9c5db199SXin Lidef run(machine): 36*9c5db199SXin Li host = hosts.create_host(machine) 37*9c5db199SXin Li with tempfile.NamedTemporaryFile(suffix='.yaml', mode='w') as temp_file: 38*9c5db199SXin Li host_info = host.host_info_store.get() 39*9c5db199SXin Li yaml.safe_dump({'autotest_host_info_labels': 40*9c5db199SXin Li json.dumps(host_info.labels)}, stream=temp_file) 41*9c5db199SXin Li temp_file.flush() 42*9c5db199SXin Li job.run_test('tast', 43*9c5db199SXin Li host=host, 44*9c5db199SXin Li test_exprs=['("group:cellular" && "cellular_sim_pinlock" && !"cellular_unstable")'], 45*9c5db199SXin Li ignore_test_failures=True, max_run_sec=10800, 46*9c5db199SXin Li command_args=args, 47*9c5db199SXin Li varsfiles=[temp_file.name]) 48*9c5db199SXin Li 49*9c5db199SXin Liparallel_simple(run, machines) 50