Documentation ¶
Overview ¶
Package typecutils contains functionality shared by typec tests.
Index ¶
- func BuiltInTBTDevice(name string) bool
- func CheckPortsForTBTPartner(ctx context.Context) (int, error)
- func CheckTBTAndDP(ctx context.Context, tc *chrome.TestConn) error
- func CheckTBTDevice(expected bool) error
- func EnablePeripheralDataAccess(ctx context.Context, keyPath string) error
- func FindConnectedDPMonitor(ctx context.Context, tc *chrome.TestConn) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuiltInTBTDevice ¶
BuiltInTBTDevice returns whether the specified name is a built-in Thunderbolt device or not.
func CheckPortsForTBTPartner ¶
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 ¶
CheckTBTAndDP is a convenience function that checks for TBT and DP enumeration. It returns nil on success, and the relevant error otherwise.
func CheckTBTDevice ¶
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 ¶
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 ¶
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.