aboutsummaryrefslogtreecommitdiff
path: root/server/site_tests/hardware_StorageQualV2/control.storage_qual_v2_stress_08_1
blob: 03fed618ea03e282be3fe002a5d8139609065b8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

from autotest_lib.client.common_lib import utils

AUTHOR = 'abergman, chromeos-engprod-platform-syd'
NAME = 'storage_qual_v2_stress_08'
ATTRIBUTES = 'suite:storage_qual_v2_xl, suite:storage_qual_v2_l, suite:storage_qual_v2_m, suite:storage_qual_v2_s'
TIME = 'long'
TEST_CATEGORY = 'Stress'
TEST_CLASS = 'Hardware'
TEST_TYPE = 'Server'
PY_VERSION = 3
PRIORITY = 93
MAX_RESULT_SIZE_KB = 1024 * 1024
JOB_RETRIES = 0
REQUIRE_SSP = True
FAST = False
DEPENDENCIES = 'dut:1'

DOC = '''
Run the Tast-based storage qualification quick test.

Tast is an integration-testing framework analogous to the test-running portion
of Autotest. See https://chromium.googlesource.com/chromiumos/platform/tast/ for
more information.

See http://go/tast-failures for information about investigating failures.
'''
import tempfile
import yaml

keyval = dict()
keyval['storage_qual_version'] = 2
keyval['bug_id'] = bug_id
keyval['part_id'] = part_id
utils.write_keyval(job.resultdir, keyval)

def run(machine):
    args_dict = globals().get('args_dict', dict())

    with tempfile.NamedTemporaryFile(suffix='.yaml', mode='w+', encoding='utf-8') as temp_file:
        # Writing test arguments to yaml file except for wrapper-related arguments.
        test_args = dict()
        for key in args_dict:
            if key.startswith('tast_'):
                test_args[key] = args_dict[key]
        yaml.safe_dump(test_args,
                      stream=temp_file,
                      default_flow_style=False,
                      allow_unicode=True)

        job.run_test('tast',
                    host=hosts.create_host(machine),
                    test_exprs=['storage.FullQualificationStress.stress'],
                    ignore_test_failures=False,
                    max_run_sec=28800,
                    command_args=args,
                    varsfiles=[temp_file.name])

parallel_simple(run, machines)