# 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_PDDataSwap.dts"
PURPOSE = "Servo based PD data role swap test"
ATTRIBUTES = "suite:faft_pd"
CRITERIA = "This test will fail if a data swap gives unexpected results"
DEPENDENCIES = "servo_state:WORKING"
TIME = "SHORT"
TEST_CATEGORY = "Functional"
TEST_CLASS = "firmware"
TEST_TYPE = "server"
PY_VERSION = 3

DOC = """
This test checks:
  - If the DUT advertises support for data role swaps
  - Tests if the DUT can receive data swap requests
  - Tests if the DUT can initate data swap requests
"""

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_PDDataSwap", host=host, cmdline_args=args,
                 disable_sysinfo=True, flip_cc=False, dts_mode=True,
                 tag="dts")

parallel_simple(run, machines)
