Documentation ¶
Overview ¶
Package autocaps determines the DUT's capabilities by parsing autotest-capability YAML files.
autotest-capability is a pre-Tast system developed to permit Autotest-based video tests to examine the DUT's capabilities to e.g. determine which codecs are supported.
Capabilities are mostly statically assigned in the system image via layered YAML files in /usr/local/etc/autotest-capability, but in order to support the same system image being shared across different SKUs, "detectors" can also be used to determine capabilities at runtime based on the CPU model and the presence of a Kepler PCI device.
See https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/HEAD/chromeos-base/autotest-capability-default/ for more information about autotest-capability.
Index ¶
Constants ¶
const ( // DefaultCapabilityDir is the directory where yaml files are installed by autotest-capability. DefaultCapabilityDir = "/usr/local/etc/autotest-capability" // ManagedFile is a path to the file listing all know capabilities. ManagedFile = "managed-capabilities.yaml" )
Variables ¶
This section is empty.
Functions ¶
func Read ¶
Read reads YAML files specifying capabilities from the directory at dir. info is used to determine which capabilities are set; if nil, system info will be loaded by this function. A map containing all managed capabilities with their corresponding states is returned.
Tests should not call this function or check capabilities directly. Instead, they should declare dependencies on required capabilities as described at https://chromium.googlesource.com/chromiumos/platform/tast/+/HEAD/docs/test_dependencies.md.
Types ¶
type SysInfo ¶
type SysInfo struct { // CPUModel contains the value from the "Model name:" line printed by lscpu. CPUModel string // HasKepler is true if "lspci -n -d <keplerID>" prints non-empty output. HasKepler bool // HasUsbCamera is true iff there's built-in USB camera. HasUsbCamera bool // HasMipiCamera is true iff there's built-in MIPI camera. HasMipiCamera bool }
SysInfo contains information about the system.