aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vogt <vogt.adam@gmail.com>2014-05-02 20:49:04 +0200
committerAdam Vogt <vogt.adam@gmail.com>2014-05-02 20:49:04 +0200
commit4bb4a6f93c73e0767000e0664034dbfbb37ce40f (patch)
treef806d62dede175c7b0057aee220439b9b525c048
parent38c50886f6a6e85aa4750bf3d2e55924f2537264 (diff)
downloadxmonad-4bb4a6f93c73e0767000e0664034dbfbb37ce40f.tar.gz
xmonad-4bb4a6f93c73e0767000e0664034dbfbb37ce40f.tar.xz
xmonad-4bb4a6f93c73e0767000e0664034dbfbb37ce40f.zip
updated hpc
Ignore-this: a7f72dfb7414f48c55441eda6aaa1236 darcs-hash:20140502184904-1499c-b3f8164fb4cce1e3d40feaa5f0346066d3efc7f2.gz
-rwxr-xr-xtests/coverage.hs10
-rwxr-xr-xutil/hpcReport.sh20
2 files changed, 20 insertions, 10 deletions
diff --git a/tests/coverage.hs b/tests/coverage.hs
deleted file mode 100755
index 3600951..0000000
--- a/tests/coverage.hs
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env runhaskell
-
-import System.Cmd
-
--- generate appropriate .hpc files
-main = do
- system $ "rm -rf *.tix"
- system $ "dist/build/xmonad/xmonad --run-tests"
- system $ "hpc markup xmonad --exclude=Main --exclude=Properties --exclude=XMonad --exclude=Paths_xmonad"
- system $ "hpc report xmonad --exclude=Main --exclude=Properties --exclude=XMonad --exclude=Paths_xmonad"
diff --git a/util/hpcReport.sh b/util/hpcReport.sh
new file mode 100755
index 0000000..9348a46
--- /dev/null
+++ b/util/hpcReport.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+if [ ! -e xmonad.cabal ]; 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
+
+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