Documentation
¶
Index ¶
- Constants
- func PkgsForTags(projectDir string, tags []string, param TestParam) ([]string, error)
- func PkgsToTest(projectDir string, tags []string, partition *Partition, param TestParam, ...) ([]string, error)
- func RunTestCmd(projectDir string, testArgs, tags []string, junitOutput string, ...) (rErr error)
- type Partition
- type TestParam
Constants ¶
View Source
const ( AllTagName = "all" NoneTagName = "none" )
View Source
const GoJUnitReport = "gojunitreport"
Variables ¶
This section is empty.
Functions ¶
func PkgsForTags ¶
func PkgsToTest ¶ added in v1.49.0
func PkgsToTest(projectDir string, tags []string, partition *Partition, param TestParam, stdout io.Writer) ([]string, error)
PkgsToTest returns the list of packages to test based on tags, exclusions, and partitioning. Returns an error if partition parsing fails or no packages are found (unless partitioning results in empty set).
Types ¶
type Partition ¶ added in v1.49.0
type Partition struct {
Index int // 0-indexed partition number
Total int // total number of partitions
}
Partition represents a partition configuration for splitting packages.
func ParsePartition ¶ added in v1.49.0
ParsePartition parses a partition string in the format "X,N" where X is the 0-indexed partition number and N is the total number of partitions. Returns nil if the input is empty (no partitioning).
type TestParam ¶
type TestParam struct {
// Tags group tests into different sets. The key is the name of the tag and the value is a matcher.NamesPathsCfg
// that specifies the rules for matching the tests that are part of the tag. Any test that matches the provided
// matcher is considered part of the tag.
Tags map[string]matcher.Matcher
// Exclude specifies the files that should be excluded from tests.
Exclude matcher.Matcher
}
Click to show internal directories.
Click to hide internal directories.