baseline

package
v0.0.0-...-03d6fc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2019 License: BSD-3-Clause Imports: 12 Imported by: 0

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

func ReadMergeableBaseline(r io.Reader) (types.TestExp, error)

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

func WriteMergeableBaseline(w io.Writer, baseLine types.TestExp) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL