aboutsummaryrefslogtreecommitdiffstats
path: root/util/hpcReport.sh
blob: 67252cf421bbfbb7487ca82afc9e2634e160f28c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash

set -e

if [[ ! ( -e xmonad.cabal && -e dist/hpc/tix/properties/properties.tix ) ]]; then
  echo "run in the same dir as xmonad.cabal after having run

      cabal configure --enable-tests --enable-library-coverage; cabal test

        "
  exit 1
fi


propsExclude=$(find tests/Properties -name '*.hs' \
        | sed -e 's_/_._g' -e 's_.hs$__' -e 's_^tests._--exclude=_' )

hpcFlags="
  --exclude=Instances
  --exclude=Utils
  --exclude=Main
  $propsExclude
  --hpcdir=dist/hpc/mix/xmonad-0.12/
  dist/hpc/tix/properties/properties.tix
  "

hpc markup --destdir=dist/hpc $hpcFlags > /dev/null
echo "see dist/hpc/hpc_index.html
"
hpc report $hpcFlags