Documentation ¶
Overview ¶
Package testrunner exposes a way to interact with test_runner builds.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var InvalidDependencies = errors.BoolTag{Key: errors.NewTagKey("invalid test dependencies")}
InvalidDependencies tag indicates that an error was caused because swarming dependencies for a task were invalid.
Functions ¶
func ValidateDependencies ¶
func ValidateDependencies(ctx context.Context, c trservice.Client, argsGenerator ArgsGenerator) ([]types.TaskDimKeyVal, error)
ValidateDependencies checks whether this test has dependencies satisfied by at least one Skylab bot.
Returns nil if the dependencies are valid and satisfiable. Returns an error tagged with InvalidDependencies tag if provided dependencies are invalid. Optionally returns a map of the unsatisfiable dependencies.
Errors encountered in dependency validation are returned as generic errors.
Types ¶
type ArgsGenerator ¶
type ArgsGenerator interface { // Generate arguments for swarming task or buildbucket build. GenerateArgs(ctx context.Context) (request.Args, error) // Check the internal consistency of of the generator arguments. CheckConsistency() error }
ArgsGenerator is used to generate arguments to buildbucket / swarming.
type Build ¶
type Build struct {
// contains filtered or unexported fields
}
Build represents an individual test_runner build.
func NewBuildForTesting ¶
NewBuildForTesting allows other packages to create builds objects with arbitrary fields for testing.
func (*Build) Refresh ¶
Refresh fetches and updates the state of the given build from the test_runner service.
func (*Build) Result ¶
func (b *Build) Result() *steps.ExecuteResponse_TaskResult
Result constructs a TaskResults out of the last known state of the Build.
In order to get the latest result, FetchResult needs to be called first.