Documentation ¶
Overview ¶
Package runner contains the part of c4t that runs compiled test binaries and interprets their output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNoBin occurs when a successful compile result has no binary path attached. ErrNoBin = errors.New("no binary in compile result") // ErrParserNil occurs when a runner config doesn't specify an observation parser. ErrParserNil = errors.New("obs-parser nil") )
Functions ¶
This section is empty.
Types ¶
type CompilerResult ¶
type CompilerResult struct { // Status is the status of this run. Status status.Status `json:"status"` // Obs is this subject's processed observation, if any. Obs *obs.Obs `json:"obs,omitempty"` }
CompilerResult contains results from a subject/compiler pairing.
type Error ¶
type Error struct { // Stage is a representation of the part of the runner that went wrong. Stage string // Compilation is the name of the compilation whose run caused the error. Compilation compilation.Name // Inner is the inner error, if any, that caused this error. Inner error }
Error is the main error type returned by the runner. It wraps an inner error with various pieces of context.
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
Instance contains all state required to perform a runner operation for a given subject.
type Option ¶
Option is the type of functional options for the machine node.
func ObserveWith ¶
ObserveWith adds each observer in obs to the runner's observer list.
func OverrideQuantities ¶
OverrideQuantities overrides this runner's quantities with qs.
type Pathset ¶
type Pathset struct { // DirObs is the directory into which observations should go. DirObs string // DirFailures is the directory into which failing tests should go. DirFailures string }
Pathset contains the top-level paths for a runner instance.
func NewPathset ¶
NewPathset constructs a new pathset from the directory root.
type Result ¶
type Result struct { // Time is the time at which the run commenced. Time time.Time `json:"time,omitempty"` // Normalise is the set of results categorised by subject. // Each key is the subject's name. Subjects map[string]SubjectResult `json:"subject,omitempty"` }
Result is the type of results from a single test run.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner contains information necessary to run a plan's compiled test cases.
func New ¶
New creates a new batch compiler instance using the config c and plan p. It can fail if various safety checks fail on the config, or if there is no obvious machine that the compiler can target.
type SubjectResult ¶
type SubjectResult struct { // Compilers is the set of per-compiler results that were reported for this subject. // Each key is a stringified form of a compiler CompilerID. Compilers map[string]CompilerResult `json:"compiler,omitempty"` }
SubjectResult contains results from a single subject.