Documentation
¶
Overview ¶
Package run implements the clone/baseline/replace/retest loop for a single (upstream, dependent) pair.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveUpstream ¶
ResolveUpstream returns an absolute path to the patched upstream source. If opts.UpstreamPath is set it's validated by manager detection and used as-is; otherwise opts.UpstreamRepo is cloned at opts.UpstreamRef into workdir/upstream. Exported so callers running many dependents can resolve once and pass the path to each Test.
Types ¶
type Options ¶
type Options struct {
Module string // upstream package name as the dependent's manager knows it
UpstreamRepo string // git URL to clone the upstream from when UpstreamPath is empty
UpstreamRef string // git ref to clone the upstream at; ignored if UpstreamPath is set
UpstreamPath string // local path to the patched upstream
Dependent string // repo URL or local path
DependentRef string // optional ref to check out in the dependent
Name string // display name for the dependent in reports; defaults to Dependent
Workdir string // base directory for clones; temp dir if empty
TestCmd string // override test command; defaults per ecosystem
Timeout time.Duration // per test run
Keep bool // keep workdir on exit
Stderr io.Writer // progress output
}
type Result ¶
type Result struct {
Module string
Dependent string
DependentPath string
UpstreamPath string
Manager string
Narrowed int // packages the test command was auto-narrowed to; 0 = ./...
Baseline TestRun
Patched TestRun
}
type ResultEntry ¶
func (ResultEntry) Status ¶
func (e ResultEntry) Status() Status
type Results ¶
type Results []ResultEntry
Results aggregates one Result per dependent. SetupErr is set when Test returned an error before producing a Result (clone failed, replace failed, manager not detected); those count as errors in the summary but don't fail the overall run.
type TestRun ¶
type TestRun struct {
Command []string
Output string
ExitCode int
Duration time.Duration
Err error // non-nil only when the process failed to start
}
TestRun captures the outcome of one `go test ./...` invocation. Step 5 in the plan upgrades this to per-test diffing via -json; for now it's exit-code plus combined output.