Documentation ¶
Index ¶
- func AddOriginalTargetsToCoverage(state *core.BuildState, includeAllFiles bool)
- func CopySurefireXmlFilesToDir(state *core.BuildState, surefireDir string)
- func CountCoverage(lines []core.LineCoverage) (int, int)
- func LoadPreviousFailures(filename string) ([]core.BuildLabel, []string)
- func RemoveFilesFromCoverage(coverage core.TestCoverage, extensions []string)
- func RemoveTestOutputs(target *core.BuildTarget) error
- func Test(tid int, state *core.BuildState, label core.BuildLabel)
- func WriteCoverageToFileOrDie(coverage core.TestCoverage, filename string)
- func WriteResultsToFileOrDie(graph *core.BuildGraph, filename string)
- func WriteXMLCoverageToFileOrDie(sources []core.BuildLabel, coverage core.TestCoverage, 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 CopySurefireXmlFilesToDir ¶
func CopySurefireXmlFilesToDir(state *core.BuildState, surefireDir string)
CopySurefireXmlFilesToDir copies all the XML test results files into the given directory.
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 RemoveFilesFromCoverage ¶
func RemoveFilesFromCoverage(coverage core.TestCoverage, extensions []string)
RemoveFilesFromCoverage removes any files with extensions matching the given set from coverage.
func RemoveTestOutputs ¶
func RemoveTestOutputs(target *core.BuildTarget) error
RemoveTestOutputs removes any cached test or coverage result files for a target.
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.
func WriteXMLCoverageToFileOrDie ¶
func WriteXMLCoverageToFileOrDie(sources []core.BuildLabel, coverage core.TestCoverage, filename string)
WriteXMLCoverageToFileOrDie writes the collected coverage data to a file in XML format. Dies on failure.
Types ¶
This section is empty.