1# Copyright 2020 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 = 'abergman, chromeos-engprod-platform-syd' 6NAME = 'tast.storage-qual-quick' 7TIME = 'MEDIUM' 8TEST_TYPE = 'Server' 9ATTRIBUTES = 'suite:storage_qual_v2_quick' 10MAX_RESULT_SIZE_KB = 1024 * 1024 11 12# tast.py uses binaries installed from autotest_server_package.tar.bz2. 13REQUIRE_SSP = True 14 15DOC = ''' 16Run the Tast-based storage qualification quick test. 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 22See http://go/tast-failures for information about investigating failures. 23''' 24 25import tempfile 26import yaml 27 28def run(machine): 29 args_dict = globals().get('args_dict', {}) 30 test_exprs = args_dict.get('test_exprs', 'storage.QuickStress.*').split(',') 31 max_run_sec = args_dict.get('max_run_sec', 12 * 60 * 60) 32 33 with tempfile.NamedTemporaryFile(suffix='.yaml') as temp_file: 34 # Writing test arguments to yaml file except for wrapper-related arguments. 35 test_args = dict() 36 tast_prefix = 'tast_' 37 for key, value in args_dict.items(): 38 if key.startswith(tast_prefix): 39 test_args[key] = value.lstrip(tast_prefix) 40 yaml.dump(test_args, stream=temp_file, default_flow_style=False) 41 42 job.run_test('tast', 43 host=hosts.create_host(machine), 44 test_exprs=test_exprs, 45 ignore_test_failures=False, 46 max_run_sec=max_run_sec, 47 command_args=args, 48 varsfiles=[temp_file.name]) 49 50parallel_simple(run, machines) 51