Documentation
¶
Overview ¶
Package testprocess launches correctness-test children through a bounded, platform-native process-tree owner.
Index ¶
- Constants
- func InheritEnvironment(overrides map[string]string) ([]string, error)
- func RequireClean(result Result, lifecycleErr error) error
- func RequireSuccess(result Result, lifecycleErr error) error
- type Command
- type Event
- type EventReader
- type OutputSnapshot
- type OutputStream
- type Owner
- type Process
- func (process *Process) Diagnostic() string
- func (process *Process) Events() *EventReader
- func (process *Process) Interrupt(ctx context.Context) (Result, error)
- func (process *Process) Stderr() OutputSnapshot
- func (process *Process) Stdout() OutputSnapshot
- func (process *Process) Stop(ctx context.Context) (Result, error)
- func (process *Process) Wait(ctx context.Context) (Result, error)
- func (process *Process) WaitForOutput(ctx context.Context, stream OutputStream, pattern *regexp.Regexp) ([]string, error)
- type Result
- type Spec
Constants ¶
const MaximumCapturedEvents = 1024
const MaximumCapturedOutputBytes = 1 << 20
Variables ¶
This section is empty.
Functions ¶
func InheritEnvironment ¶
InheritEnvironment returns one deterministic entry per variable while removing transport handles that belong to a different child process.
func RequireClean ¶
RequireClean separates process-tree ownership from the target's business exit status. Cleanup paths use it because an intentional stop may validly produce a non-zero target exit while still retiring every descendant.
func RequireSuccess ¶
Types ¶
type EventReader ¶
type EventReader struct {
// contains filtered or unexported fields
}
func (*EventReader) Done ¶
func (reader *EventReader) Done() <-chan struct{}
func (*EventReader) Err ¶
func (reader *EventReader) Err() error
type OutputSnapshot ¶
func (OutputSnapshot) String ¶
func (snapshot OutputSnapshot) String() string
type OutputStream ¶
type OutputStream string
const ( Stdout OutputStream = "stdout" Stderr OutputStream = "stderr" )
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
func (*Process) Diagnostic ¶
func (*Process) Events ¶
func (process *Process) Events() *EventReader
func (*Process) Stderr ¶
func (process *Process) Stderr() OutputSnapshot
func (*Process) Stdout ¶
func (process *Process) Stdout() OutputSnapshot
func (*Process) WaitForOutput ¶
type Result ¶
type Result = processowner.Result