dut

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package dut provides representation of the device-under-test (DUT).

Index

Constants

This section is empty.

Variables

View Source
var ErrModuleValidation = errors.New("validation error")

Functions

This section is empty.

Types

type Command

type Command struct {
	Desc    string
	Modules []Module
}

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

func (c *Command) UnmarshalYAML(node *yaml.Node) error

UnmarshalYAML unmarshals a Command from a YAML node and adds custom validation.

type Device

type Device struct {
	Desc string
	Cmds map[string]Command
}

Device is the representation of a device-under-test (DUT).

type Devlist added in v0.1.0

type Devlist map[string]Device

Devlist is a list of devices-under-test.

func (Devlist) Cmds added in v0.1.0

func (devs Devlist) Cmds(device string) []string

func (Devlist) Names added in v0.1.0

func (devs Devlist) Names() []string

type Module

type Module struct {
	Config ModuleConfig

	module.Module
}

Module is a wrapper for any module implementation.

func (*Module) UnmarshalYAML

func (m *Module) UnmarshalYAML(node *yaml.Node) error

UnmarshalYAML unmarshals a Module from a YAML node and adds custom validation.

type ModuleConfig

type ModuleConfig struct {
	Name    string `yaml:"module"`
	Main    bool
	Args    *string
	Options map[string]any
}

Jump to

Keyboard shortcuts

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