Documentation ¶
Overview ¶
package baseline contains functions to gather the current baseline and write them to GCS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommitIssueBaseline ¶
func CommitIssueBaseline(issueID int64, user string, issueChanges types.TestExp, tryjobStore tryjobstore.TryjobStore, expStore expstorage.ExpectationsStore) error
CommitIssueBaseline commits the expectations for the given issue to the master baseline.
func ReadMergeableBaseline ¶
ReadMergeableBaseline reads the expectations from the given reader, expecting the file format described above. It assumes that the given input file can be the result of Git merging two files that were previously written via the WriteMergeableBaseline function. It check that the input is consistent with the file format described above.
func WriteMergeableBaseline ¶
WriteMergeableBaseline writes the given expectations to the provided Writer in a file format that should be easy to merge for git. The input is checked against these conditions:
- No empty test names are allowed
- All digests must be valid hex-encoded MD5 hashes (32 characters).
Types ¶
type CommitableBaseLine ¶
type CommitableBaseLine struct { // Start commit covered by these baselines. StartCommit *tiling.Commit `json:"startCommit"` // Commit is the commit for which this baseline was collected. EndCommit *tiling.Commit `json:"endCommit"` // Baseline captures the baseline of the current commit. Baseline types.TestExp `json:"master"` // Issue indicates the Gerrit issue of this baseline. 0 indicates the master branch. Issue int64 }
CommitableBaseLine captures the data necessary to verify test results on the commit queue.
func GetBaselineForIssue ¶
func GetBaselineForIssue(issueID int64, tryjobs []*tryjobstore.Tryjob, tryjobResults [][]*tryjobstore.TryjobResult, exp types.Expectations, commits []*tiling.Commit, talliesByTest map[string]tally.Tally) *CommitableBaseLine
GetBaselineForIssue returns the baseline for the given issue. This baseline contains all triaged digests that are not in the master tile.
func GetBaselineForMaster ¶
func GetBaselineForMaster(exps types.Expectations, tile *tiling.Tile) *CommitableBaseLine
GetBaselineForMaster calculates the master baseline for the given configuration of expectations and the given tile. The commit of the baseline is last commit in tile.