aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vogt <vogt.adam@gmail.com>2014-05-02 21:29:07 +0200
committerAdam Vogt <vogt.adam@gmail.com>2014-05-02 21:29:07 +0200
commitf39af6224f5e3974dbe7d1d5f754ff97ecabaaa2 (patch)
treebfb5f682160795da228830eb51e45ad9e3e53508
parent571addb8e0ffd6df31822e4e65bc882452a5b09c (diff)
downloadxmonad-f39af6224f5e3974dbe7d1d5f754ff97ecabaaa2.tar.gz
xmonad-f39af6224f5e3974dbe7d1d5f754ff97ecabaaa2.tar.xz
xmonad-f39af6224f5e3974dbe7d1d5f754ff97ecabaaa2.zip
put hpc reports in dist/hpc/
Ignore-this: 28a6561819667adf513b71975a1096ad darcs-hash:20140502192907-1499c-578c200002e298b0831ff686e898e3272bc7d98c.gz
Diffstat (limited to '')
-rwxr-xr-xutil/hpcReport.sh30
1 files changed, 20 insertions, 10 deletions
diff --git a/util/hpcReport.sh b/util/hpcReport.sh
index 9348a46..67252cf 100755
--- a/util/hpcReport.sh
+++ b/util/hpcReport.sh
@@ -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