Skip to content

Commit 526c5eb

Browse files
committed
Add Hydra build products for test coverage reports
1 parent c88f9ec commit 526c5eb

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/cover-project.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ in pkgs.runCommand "project-coverage-report"
106106
popd
107107
}
108108
109+
mkdir -p $out/nix-support
109110
mkdir -p $out/share/hpc/vanilla/tix/all
110111
mkdir -p $out/share/hpc/vanilla/mix/
111112
mkdir -p $out/share/hpc/vanilla/html/
@@ -136,6 +137,7 @@ in pkgs.runCommand "project-coverage-report"
136137
137138
# Markup a HTML coverage report for the entire project
138139
cp ${projectIndexHtml} $out/share/hpc/vanilla/html/index.html
140+
echo "report coverage-per-package $out/share/hpc/vanilla/html/index.html" >> $out/nix-support/hydra-build-products
139141
140142
local markupOutDir="$out/share/hpc/vanilla/html/all"
141143
local srcDirs=${toBashArray srcDirs}
@@ -146,5 +148,6 @@ in pkgs.runCommand "project-coverage-report"
146148
findModules allMixModules "$out/share/hpc/vanilla/mix/" "*.mix"
147149
148150
markup srcDirs mixDirs allMixModules "$markupOutDir" "$tixFile"
151+
echo "report coverage $markupOutDir/hpc_index.html" >> $out/nix-support/hydra-build-products
149152
fi
150153
''

lib/cover.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ in pkgs.runCommand (name + "-coverage-report")
9999
100100
local mixDirs=${toBashArray mixDirs}
101101
102+
mkdir -p $out/nix-support
102103
mkdir -p $out/share/hpc/vanilla/mix/${name}
103104
mkdir -p $out/share/hpc/vanilla/tix/${name}
104105
mkdir -p $out/share/hpc/vanilla/html/${name}
@@ -161,5 +162,7 @@ in pkgs.runCommand (name + "-coverage-report")
161162
162163
# Markup a HTML report, included modules from only this package
163164
markup srcDirs mixDirs pkgMixModules "$markupOutDir" "$sumTixFile"
165+
166+
echo "report coverage $markupOutDir/hpc_index.html" >> $out/nix-support/hydra-build-products
164167
fi
165168
''

0 commit comments

Comments
 (0)