releaseTools.coverageAnalysis: Emit hydra-metrics
This commit is contained in:
parent
2c9a97ee14
commit
068f8abaa5
|
@ -10,9 +10,16 @@ coverageReportPhase() {
|
||||||
mkdir -p $out/coverage
|
mkdir -p $out/coverage
|
||||||
genhtml app.info $lcovExtraTraceFiles -o $out/coverage > log
|
genhtml app.info $lcovExtraTraceFiles -o $out/coverage > log
|
||||||
|
|
||||||
# Grab the overall coverage percentage for use in release overviews.
|
# Grab the overall coverage percentage so that Hydra can plot it over time.
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
grep "Overall coverage rate" log | sed 's/^.*(\(.*\)%).*$/\1/' > $out/nix-support/coverage-rate
|
lineCoverage="$(sed 's/.*lines\.*: \([0-9\.]\+\)%.*/\1/; t ; d' log)"
|
||||||
|
functionCoverage="$(sed 's/.*functions\.*: \([0-9\.]\+\)%.*/\1/; t ; d' log)"
|
||||||
|
if [ -z "$lineCoverage" -o -z "$functionCoverage" ]; then
|
||||||
|
echo "failed to get coverage statistics"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "lineCoverage $lineCoverage %" >> $out/nix-support/hydra-metrics
|
||||||
|
echo "functionCoverage $functionCoverage %" >> $out/nix-support/hydra-metrics
|
||||||
|
|
||||||
echo "report coverage $out/coverage" >> $out/nix-support/hydra-build-products
|
echo "report coverage $out/coverage" >> $out/nix-support/hydra-build-products
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue