diff options
Diffstat (limited to 'coverage.nix')
-rw-r--r-- | coverage.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/coverage.nix b/coverage.nix new file mode 100644 index 0000000..ed03ce8 --- /dev/null +++ b/coverage.nix | |||
@@ -0,0 +1,19 @@ | |||
1 | { pkgs ? import ./nixpkgs-pinned.nix {} }: | ||
2 | (import ./default.nix { inherit pkgs; }).overrideAttrs (final: prev: { | ||
3 | name = "mininix-coverage"; | ||
4 | |||
5 | nativeBuildInputs = prev.nativeBuildInputs ++ [ | ||
6 | pkgs.ocaml-ng.ocamlPackages_4_14.bisect_ppx | ||
7 | ]; | ||
8 | |||
9 | checkPhase = '' | ||
10 | dune test --instrument-with bisect_ppx --force | ||
11 | ''; | ||
12 | |||
13 | installPhase = '' | ||
14 | mkdir -p $out/coverage | ||
15 | bisect-ppx-report summary --per-file > $out/coverage/report-plain | ||
16 | bisect-ppx-report html | ||
17 | cp -R _coverage $out/coverage/html/ | ||
18 | ''; | ||
19 | }) | ||