# Copyright 2019 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.server import utils

AUTHOR = "Chrome OS Team"
NAME = "firmware_PDResetHard.dts"
PURPOSE = "Servo based PD hard reset test"
ATTRIBUTES = "suite:faft_pd"
CRITERIA = "This test will fail if hard reset does not complete"
TIME = "SHORT"
TEST_CATEGORY = "Functional"
TEST_CLASS = "firmware"
TEST_TYPE = "server"

DOC = """
This test checks:
  - Ability of DUT to initate hard resets
  - Ability of DUT to receive hard resets
  - If DUT is dualrole capable, hard resets are done with the DUT
    in each power role.
"""

args_dict = utils.args_to_dict(args)
servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
pdtester_args = hosts.CrosHost.get_pdtester_arguments(args_dict)

def run(machine):
    host = hosts.create_host(machine, servo_args=servo_args,
                             pdtester_args=pdtester_args)
    job.run_test("firmware_PDResetHard", host=host, cmdline_args=args,
                 disable_sysinfo=True, flip_cc=False, dts_mode=True,
                 tag="dts")

parallel_simple(run, machines)
