typecutils

package
v0.0.0-...-9474aff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2022 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Overview

Package typecutils contains functionality shared by typec tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuiltInTBTDevice

func BuiltInTBTDevice(name string) bool

BuiltInTBTDevice returns whether the specified name is a built-in Thunderbolt device or not.

func CheckPortsForTBTPartner

func CheckPortsForTBTPartner(ctx context.Context) (int, error)

CheckPortsForTBTPartner checks whether the device has a connected Thunderbolt device. We use the 'ectool typecdiscovery' command to accomplish this. Check each port successively. If a port returns an INVALID_PARAM error, that means we are out of ports.

This functions returns: - Whether a TBT device is connected to the DUT. If yes, return the port index, otherwise return -1. - The error value if the command didn't run, else nil.

func CheckTBTAndDP

func CheckTBTAndDP(ctx context.Context, tc *chrome.TestConn) error

CheckTBTAndDP is a convenience function that checks for TBT and DP enumeration. It returns nil on success, and the relevant error otherwise.

func CheckTBTDevice

func CheckTBTDevice(expected bool) error

CheckTBTDevice is a helper function which checks for a TBT connected device. |expected| specifies whether we want to check for the presence of a TBT device (true) or the absence of one (false).

func EnablePeripheralDataAccess

func EnablePeripheralDataAccess(ctx context.Context, keyPath string) error

EnablePeripheralDataAccess sets the Chrome device settings to have the "DevicePciPeripheralDataAccessEnabled" setting set to true. This allows alternate mode switching to occur. keyPath denotes the keypath of the keyfile which is pushed to the device and which is necessary to store the new settings proto.

func FindConnectedDPMonitor

func FindConnectedDPMonitor(ctx context.Context, tc *chrome.TestConn) error

FindConnectedDPMonitor checks the following two conditions: - that modetest indicates a connected Display Port connector - that there is a enabled "non-internal" display.

These two signals are used as to determine whether a DP monitor is successfully connected and showing the extended screen.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL