mach

package
v0.0.0-...-1dd1f65 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package mach contains the 'machine-dependent' stage of the tester. This stage encapsulates the batch-compile and run stages of the tester, and provides common infrastructure for both.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mach

type Mach struct {
	// contains filtered or unexported fields
}

Mach encapsulates the state needed for the machine-dependent stage.

func New

func New(cdriver interpreter.Driver, bresolve backend2.Resolver, opts ...Option) (*Mach, error)

func (*Mach) Close

func (m *Mach) Close() error

Close delegates to the compiler and runner closers.

func (*Mach) Run

func (m *Mach) Run(ctx context.Context, p *plan.Plan) (*plan.Plan, error)

func (*Mach) Stage

func (*Mach) Stage() stage.Stage

Stage returns the appropriate stage for the machine node.

type Option

type Option func(*Mach) error

Option is the type of functional options.

func ForwardTo

func ForwardTo(fwd *forward.Observer) Option

ForwardTo tells the machine node to observe with, and forward errors to, fwd.

func Options

func Options(opts ...Option) Option

Options applies each option in opts in turn.

func OutputDir

func OutputDir(path string) Option

OutputDir sets the output directory for both compiler and runner to path.

func OverrideQuantities

func OverrideQuantities(qs quantity.MachNodeSet) Option

OverrideQuantities overrides the compiler and runner quantities with qs.

func WithCompilerOptions

func WithCompilerOptions(opts ...compiler.Option) Option

WithCompilerOptions adds opts to the set of options used to configure the compiler.

func WithRunnerOptions

func WithRunnerOptions(opts ...runner.Option) Option

WithRunnerOptions adds opts to the set of options used to configure the runner.

Directories

Path Synopsis
Package compiler contains a test-plan batch compiler.
Package compiler contains a test-plan batch compiler.
Package forward describes the JSON-based protocol used to 'forward' messages and errors from a machine node to its invoker, potentially over SSH.
Package forward describes the JSON-based protocol used to 'forward' messages and errors from a machine node to its invoker, potentially over SSH.
Package interpreter contains the recipe interpreter for the machine node.
Package interpreter contains the recipe interpreter for the machine node.
Package observer contains interfaces and types for machine node observers.
Package observer contains interfaces and types for machine node observers.
Package runner contains the part of c4t that runs compiled test binaries and interprets their output.
Package runner contains the part of c4t that runs compiled test binaries and interprets their output.

Jump to

Keyboard shortcuts

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