put hpc reports in dist/hpc/

This commit is contained in:
Adam Vogt
2014-05-02 19:29:07 +00:00
parent f8f53fdff8
commit 20be322b08

View File

@@ -1,6 +1,8 @@
#!/bin/bash
if [ ! -e xmonad.cabal ]; then
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
@@ -9,12 +11,20 @@ if [ ! -e xmonad.cabal ]; then
exit 1
fi
for action in markup report; do
hpc $action \
--exclude=Instances \
--exclude=Utils \
--exclude=Main \
$(find tests/Properties -name '*.hs' | sed -e 's_/_._g' -e 's_.hs$__' -e 's_^tests._--exclude=_' ) \
--hpcdir=dist/hpc/mix/xmonad-0.12/ \
dist/hpc/tix/properties/properties.tix
done
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