Documentation
¶
Index ¶
- func CommandFunctional(cliParams *settings.Run, ioStreams *terminal.IOStreams, path string) *cobra.Command
- func CommandInit(cliParams *settings.Run, ioStreams *terminal.IOStreams, path string) *cobra.Command
- func CommandList(cliParams *settings.Run, ioStreams *terminal.IOStreams, path string) *cobra.Command
- func CommandTest(cliParams *settings.Run, ioStreams *terminal.IOStreams, path string) *cobra.Command
- type FunctionalOptions
- type InitOptions
- type LineTestProgress
- type ListOptions
- type MPBTestProgress
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandFunctional ¶
func CommandFunctional(cliParams *settings.Run, ioStreams *terminal.IOStreams, path string) *cobra.Command
CommandFunctional creates the 'test functional' subcommand.
func CommandInit ¶
func CommandInit(cliParams *settings.Run, ioStreams *terminal.IOStreams, path string) *cobra.Command
CommandInit creates the 'test init' subcommand that generates a starter test suite.
Types ¶
type FunctionalOptions ¶
type FunctionalOptions struct {
IOStreams *terminal.IOStreams
CliParams *settings.Run
File string
TestsPath string
Output string
ReportFile string
UpdateSnapshots bool
Sequential bool
Concurrency int
SkipBuiltins bool
TestTimeout time.Duration
Timeout time.Duration
Filter []string
Tag []string
Solution []string
DryRun bool
FailFast bool
Verbose bool
KeepSandbox bool
NoProgress bool
Watch bool
}
FunctionalOptions holds configuration for the test functional command.
type InitOptions ¶
InitOptions holds configuration for the test init command.
type LineTestProgress ¶
type LineTestProgress struct {
// contains filtered or unexported fields
}
LineTestProgress prints one line per completed test. Suitable for non-interactive output (CI logs, piped streams).
func NewLineTestProgress ¶
func NewLineTestProgress(w *writer.Writer) *LineTestProgress
NewLineTestProgress creates a line-based progress reporter.
func (*LineTestProgress) OnTestComplete ¶
func (r *LineTestProgress) OnTestComplete(result soltesting.TestResult)
OnTestComplete prints a single status line.
func (*LineTestProgress) OnTestStart ¶
func (r *LineTestProgress) OnTestStart(_, _ string)
OnTestStart is a no-op for line-based output.
func (*LineTestProgress) Wait ¶
func (r *LineTestProgress) Wait()
Wait is a no-op for line-based output.
type ListOptions ¶
type ListOptions struct {
IOStreams *terminal.IOStreams
CliParams *settings.Run
File string
TestsPath string
Output string
IncludeBuiltins bool
Filter []string
Tag []string
Solution []string
}
ListOptions holds configuration for the test list command.
type MPBTestProgress ¶
type MPBTestProgress struct {
// contains filtered or unexported fields
}
MPBTestProgress displays animated spinner bars per test using mpb. Intended for interactive (TTY) terminals.
Lock ordering: mpb's render goroutine calls decorator closures on a timer. Decorator closures must NEVER acquire mu because OnTestStart/OnTestComplete hold mu while calling mpb methods (AddBar, Increment, Abort), which would deadlock with the render goroutine. Instead, decorator-visible data is stored in sync.Map fields that are safe for concurrent lock-free reads.
func NewMPBTestProgress ¶
func NewMPBTestProgress(w io.Writer) *MPBTestProgress
NewMPBTestProgress creates an mpb-based progress reporter that writes to w.
func (*MPBTestProgress) OnTestComplete ¶
func (p *MPBTestProgress) OnTestComplete(result soltesting.TestResult)
OnTestComplete records the result and marks the bar finished. Invariant: sync.Map stores (result, elapsed) MUST happen before the bar state transition (Increment/Abort) so decorator closures see the data when mpb's render goroutine reads it.
func (*MPBTestProgress) OnTestStart ¶
func (p *MPBTestProgress) OnTestStart(solution, test string)
OnTestStart creates a new spinner bar for the test.
func (*MPBTestProgress) Wait ¶
func (p *MPBTestProgress) Wait()
Wait blocks until all bars finish rendering.