Documentation
¶
Overview ¶
Package tracingtest runs trace plugins in specs: a runtime over a real sqlite results store and session registry, and helpers that read a session's rows.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ended ¶
func Ended(session *query.Session) query.SessionInfo
Ended waits for session to end and returns its final record.
func GoChildBinary ¶
GoChildBinary builds the Go child the process kinds' specs observe (testdata/gochild) into dir, returning its path; a suite builds it once.
Types ¶
type Env ¶
type Env struct {
// Dir holds every file the results store writes.
Dir string
Results *recordresults.Results
Sessions *query.SessionRegistry
Runtime *tracing.Runtime
}
Env is a runtime serving kinds over a sqlite results store in the spec's own temporary directory, whose sessions all stop when the spec ends.
func (Env) Read ¶
Read reads every row of stream through kind's result profile under params, as a host serving it would: the profile's own columns, filters and sort.
func (Env) Rows ¶
func (e Env) Rows(info query.SessionInfo) []recordstore.Row
Rows reads every row the session committed.
type GoChild ¶
type GoChild struct {
Cmd *exec.Cmd
PID int
Announced map[string]string
Stdin io.WriteCloser
// Stderr is what the child wrote to stderr, to read once it exited.
Stderr *bytes.Buffer
// contains filtered or unexported fields
}
GoChild is a running Go child: what it announced, by name, and its stdin.
func StartGoChild ¶
StartGoChild runs binary with args in its own process group, which the spec kills when it ends, and waits for it to announce it is ready.