Documentation ¶
Overview ¶
Package dut provides representation of the device-under-test (DUT).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrDeviceNotFound = errors.New("no such device") ErrCommandNotFound = errors.New("no such command") ErrInvalidCommand = errors.New("command not implemented - no modules or no main module set") )
var ErrModuleValidation = errors.New("validation error")
Functions ¶
This section is empty.
Types ¶
type Command ¶
Command represents a task that can be executed on a device-under-test (DUT). This task is composed of one or multiple steps. The steps are implemented by modules and are executed in the order they are defined.
func (*Command) UnmarshalYAML ¶
UnmarshalYAML unmarshals a Command from a YAML node and adds custom validation.
type Devlist ¶ added in v0.1.0
Devlist is a list of devices-under-test.
func (Devlist) CmdNames ¶ added in v0.2.0
CmdNames returns the names of all commands available for a device or ErrDeviceNotFound if the device is not found. The names are sorted alphabetically. A device with no commands will not report an error but return an empty slice.
func (Devlist) FindCmd ¶ added in v0.2.0
FindCmd returns the device and command for a given device and command name. If the device is not found, it returns ErrDeviceNotFound, if the command is not found, it returns ErrCommandNotFound. If the requested command has no modules, or no main module, it returns ErrInvalidCommand.
type Module ¶
type Module struct { Config ModuleConfig module.Module }
Module is a wrapper for any module implementation.
func (*Module) UnmarshalYAML ¶
UnmarshalYAML unmarshals a Module from a YAML node and adds custom validation.