Documentation ¶
Index ¶
- func AddOriginalTargetsToCoverage(state *core.BuildState, includeAllFiles bool)
- func CountCoverage(lines []core.LineCoverage) (int, int)
- func LoadPreviousFailures(filename string) ([]core.BuildLabel, []string)
- func RemoveCachedTestFiles(target *core.BuildTarget) error
- func RemoveFilesFromCoverage(coverage core.TestCoverage, extensions []string)
- func Test(tid int, state *core.BuildState, label core.BuildLabel)
- func WriteCoverageToFileOrDie(coverage core.TestCoverage, filename string)
- func WriteResultsToFileOrDie(graph *core.BuildGraph, filename string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOriginalTargetsToCoverage ¶
func AddOriginalTargetsToCoverage(state *core.BuildState, includeAllFiles bool)
AddOriginalTargetsToCoverage adds empty coverage entries for any files covered by the original query that we haven't discovered through tests to the overall report. The coverage reports only contain information about files that were covered during tests, so it's important that we identify anything with zero coverage here. This is made trickier by attempting to reconcile coverage targets from languages like Java that don't preserve the original file structure, which requires a slightly fuzzy match.
func CountCoverage ¶
func CountCoverage(lines []core.LineCoverage) (int, int)
CountCoverage counts the number of lines covered and the total number coverable in a single file.
func LoadPreviousFailures ¶
func LoadPreviousFailures(filename string) ([]core.BuildLabel, []string)
LoadPreviousFailures loads any failed tests from the given results file. It returns the set of targets that should be run and any arguments for them.
func RemoveCachedTestFiles ¶
func RemoveCachedTestFiles(target *core.BuildTarget) error
RemoveCachedTestFiles removes any cached test or coverage result files for a target.
func RemoveFilesFromCoverage ¶
func RemoveFilesFromCoverage(coverage core.TestCoverage, extensions []string)
RemoveFilesFromCoverage removes any files with extensions matching the given set from coverage.
func Test ¶
func Test(tid int, state *core.BuildState, label core.BuildLabel)
Test runs the tests for a single target.
func WriteCoverageToFileOrDie ¶
func WriteCoverageToFileOrDie(coverage core.TestCoverage, filename string)
WriteCoverageToFileOrDie writes the collected coverage data to a file in JSON format. Dies on failure.
func WriteResultsToFileOrDie ¶
func WriteResultsToFileOrDie(graph *core.BuildGraph, filename string)
WriteResultsToFileOrDie writes test results out to a file in xUnit format. Dies on any errors.
Types ¶
This section is empty.