Documentation ¶
Overview ¶
Package lib provides utilities for runner.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunTests ¶
func RunTests(lang, image string, filter Filter, batchSize int, timeout time.Duration, proctorSettings ProctorSettings) int
RunTests is a helper that is called by main. It exists so that we can run defered functions before exiting. It returns an exit code that should be passed to os.Exit.
Types ¶
type Filter ¶
Filter is a predicate function for filtering tests. It returns true if the given test name should be run.
func ExcludeFilter ¶
ExcludeFilter reads the exclude file and returns a filter that excludes the tests listed in the given CSV file.
type ProctorSettings ¶
type ProctorSettings struct { // PerTestTimeout is the timeout for each individual test. PerTestTimeout time.Duration // RunsPerTest is the number of times to run each test. // A value of 0 is the same as a value of 1, i.e. "run once". RunsPerTest int // If FlakyIsError is true, a flaky test will be considered as a failure. // If it is false, a flaky test will be considered as passing. FlakyIsError bool // If FlakyShortCircuit is true, when runnins with RunsPerTest > 1 and a test is detected as // flaky, exit immediately rather than running for all RunsPerTest attempts. FlakyShortCircuit bool }
ProctorSettings contains settings passed directly to the proctor process.
func (ProctorSettings) ToArgs ¶
func (p ProctorSettings) ToArgs() []string
ToArgs converts these settings to command-line arguments to pass to the proctor binary.
Click to show internal directories.
Click to hide internal directories.