hwdep

package
v0.0.0-...-d046166 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2020 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package hwdep provides the hardware dependency mechanism to select tests to run on a DUT based on its hardware features and setup.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition = dep.HardwareCondition

Condition represents one condition of hardware dependencies.

func Battery

func Battery() Condition

Battery returns a hardware dependency condition that is satisfied iff the DUT has a battery, e.g. Chromeboxes and Chromebits don't.

func ChromeEC

func ChromeEC() Condition

ChromeEC returns a hardware dependency condition that is satisfied iff the DUT has a present EC of the "Chrome EC" type.

func Fingerprint

func Fingerprint() Condition

Fingerprint returns a hardware dependency condition that is satisfied iff the DUT has fingerprint sensor.

func ForceDischarge

func ForceDischarge() Condition

ForceDischarge returns a hardware dependency condition that is satisfied iff the DUT has a battery and it supports force discharge through `ectool chargecontrol`. The devices listed in modelsWithoutForceDischargeSupport do not satisfy this condition even though they have a battery since they does not support force discharge via ectool. This is a complementary condition of NoForceDischarge.

func InternalDisplay

func InternalDisplay() Condition

InternalDisplay returns a hardware dependency condition that is satisfied iff the DUT has an internal display, e.g. Chromeboxes and Chromebits don't.

func Model

func Model(names ...string) Condition

Model returns a hardware dependency condition that is satisfied if the DUT's model ID is one of the given names. Practically, this is not recommended to be used in most cases. Please consider again if this is the appropriate use, and whether there exists another option, such as check whether DUT needs to have touchscreen, some specific SKU, internal display etc.

Expected example use case is; there is a problem in some code where we do not have control, such as a device specific driver, or hardware etc., and unfortnately it unlikely be fixed for a while. Another use case is; a test is stably running on most of models, but failing on some specific models. By using Model() and SkipOnModel() combination, the test can be promoted to critical on stably running models, while it is still informational on other models. Note that, in this case, it is expected that an engineer is assigned to stabilize/fix issues of the test on informational models.

func NoForceDischarge

func NoForceDischarge() Condition

NoForceDischarge is a complementary condition of ForceDischarge.

func Platform

func Platform(names ...string) Condition

Platform returns a hardware dependency condition that is satisfied iff the DUT's platform ID is one of the give names. Please find the doc of Model(), too, for details about the expected usage.

func SkipOnModel

func SkipOnModel(names ...string) Condition

SkipOnModel returns a hardware dependency condition that is satisfied iff the DUT's model ID is none of the given names. Please find the doc of Model(), too, for details about the expected usage.

func SkipOnPlatform

func SkipOnPlatform(names ...string) Condition

SkipOnPlatform returns a hardware dependency condition that is satisfied iff the DUT's platform ID is none of the give names. Please find the doc of Model(), too, for details about the expected usage.

func SupportsNV12Overlays

func SupportsNV12Overlays() Condition

SupportsNV12Overlays says true if the SoC supports NV12 hardware overlays, which are commonly used for video overlays. SoCs with Intel Gen 7.5 (Haswell, BayTrail) and Gen 8 GPUs (Broadwell, Braswell) for example, don't support those.

func TouchScreen

func TouchScreen() Condition

TouchScreen returns a hardware dependency condition that is satisfied iff the DUT has touchscreen.

func Wifi80211ac

func Wifi80211ac() Condition

Wifi80211ac returns a hardware dependency condition that is satisfied iff the DUT's WiFi module supports 802.11ac.

func Wifi80211ax

func Wifi80211ax() Condition

Wifi80211ax returns a hardware dependency condition that is satisfied iff the DUT's WiFi module supports 802.11ax.

func WifiMACAddrRandomize

func WifiMACAddrRandomize() Condition

WifiMACAddrRandomize returns a hardware dependency condition that is satisfied iff the DUT support WiFi MAC Address Randomization.

func WifiNotMarvell

func WifiNotMarvell() Condition

WifiNotMarvell returns a hardware dependency condition that is satisfied iff the DUT's not using a Marvell WiFi chip.

func X86

func X86() Condition

X86 returns a hardware dependency condition matching x86 ABI compatible platform.

type Deps

type Deps = dep.HardwareDeps

Deps holds hardware dependencies all of which need to be satisfied to run a test.

func D

func D(conds ...Condition) Deps

D returns hardware dependencies representing the given Conditions.

Jump to

Keyboard shortcuts

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