Documentation
¶
Overview ¶
Package runner decides pass/fail for `srig run` from streamed serial output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Evaluator ¶
type Evaluator struct {
// contains filtered or unexported fields
}
Evaluator matches serial lines against the sentinel and optional patterns.
func NewEvaluator ¶
NewEvaluator compiles the optional expect/fail regexes (empty string = unset).
type Outcome ¶
type Outcome struct {
ExitCode int
Reason string // "sentinel" | "fail" | "expect" | "timeout" | "ran"
Matched string
}
Outcome is the terminal result of a run.
type Result ¶
type Result struct {
Result string `json:"result"` // "pass" | "fail"
ExitCode int `json:"exit_code"`
Reason string `json:"reason"`
Matched string `json:"matched,omitempty"`
SessionID string `json:"session_id"`
}
Result is the machine-readable form of an Outcome for --json.
func ResultFrom ¶
ResultFrom maps an Outcome (exit 0 = pass) to a Result.
Click to show internal directories.
Click to hide internal directories.