blob: c92fb08e08411b0b2b7adc7dcb7a5a3af5a544ed [file] [log] [blame]
# Copyright 2023 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
AUTHOR = 'n/a'
NAME = '{name}'
METADATA = {{
"contacts": ["chromeos-perf-reliability-eng@google.com", "abergman@google.com"],
"bug_component": "b:1025042",
"criteria": "Tauto wrapper for SPERA v2 Tast test.",
"hw_agnostic": True
}}
ATTRIBUTES = '{attributes}'
TIME = '{length}'
TEST_TYPE = 'Server'
PRIORITY = {priority}
MAX_RESULT_SIZE_KB = 1024 * 1024
JOB_RETRIES = {retries}
REQUIRE_SSP = True
DEPENDENCIES = '{dependencies}'
PY_VERSION = 3
DOC = '''
Run the Tast-based MTBF performance CUJ test (v2).
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 common
import logging
from autotest_lib.client.common_lib import utils
from autotest_lib.site_utils.deployment.prepare import dut
from autotest_lib.utils import labellib
def report_host_info(host):
labels = labellib.LabelsMapping(host.host_info_store.get().labels)
labels['test_version'] = {version}
labels['test'] = '{test_exprs}'
labels['test_iteration'] = '{iteration}'
labels['total_tests_to_run'] = {total_tests}
utils.write_keyval(job.resultdir, labels)
try:
# Try to retrieve and report DUT HWID and serial number.
dut.setup_hwid_and_serialnumber(host)
logging.info("Host info store: %s", host.host_info_store.get())
utils.write_keyval(job.resultdir, host.host_info_store.get().attributes)
except Exception as e:
logging.warning("Failed retrieving DUT host info: %s", e)
def run(machine):
host=hosts.create_host(machine)
report_host_info(host)
job.run_test('tast',
host=host,
test_exprs=['{test_exprs}'],
clear_tpm=False,
ignore_test_failures=False,
max_run_sec={duration},
command_args=args,
vars_gs_path='{args_file}')
parallel_simple(run, machines)