fork
Configure Feed
Select the types of activity you want to include in your feed.
lol
fork
Configure Feed
Select the types of activity you want to include in your feed.
1postPhases+=" coverageReportPhase"
2
3coverageReportPhase() {
4 lcov --directory . --capture --output-file app.info
5 set -o noglob
6 lcov --remove app.info ${lcovFilter:-"/nix/store/*"} > app2.info
7 set +o noglob
8 mv app2.info app.info
9
10 mkdir -p $out/coverage
11 genhtml app.info $lcovExtraTraceFiles -o $out/coverage > log
12
13 # Grab the overall coverage percentage so that Hydra can plot it over time.
14 mkdir -p $out/nix-support
15 lineCoverage="$(sed 's/.*lines\.*: \([0-9\.]\+\)%.*/\1/; t ; d' log)"
16 functionCoverage="$(sed 's/.*functions\.*: \([0-9\.]\+\)%.*/\1/; t ; d' log)"
17 if [ -z "$lineCoverage" -o -z "$functionCoverage" ]; then
18 echo "failed to get coverage statistics"
19 exit 1
20 fi
21 echo "lineCoverage $lineCoverage %" >> $out/nix-support/hydra-metrics
22 echo "functionCoverage $functionCoverage %" >> $out/nix-support/hydra-metrics
23
24 echo "report coverage $out/coverage" >> $out/nix-support/hydra-build-products
25}