git.iko.soy/typeable/servant-reflex
on develop help sign in
typeable/servant-reflex/runTestsAndCoverage.sh
59 lines 994 B history raw
1#!/bin/sh
3set -e
5# All directory variables relative to project root
6# DIR=dist-newstyle/hpc
7DIR=./dist/hpc
9#SUITE=./dist-newstyle/build/servant-reflex-0.2/build/testsuite/testsuite
10SUITE=./dist/build/testsuite/testsuite
12if [ -z "$DEBUG" ]; then
13 export DEBUG=snap-testsuite
14fi
16rm -f testsuite.tix
17rm -rf "$DIR"
18mkdir -p "$DIR"
20if [ ! -f $SUITE ]; then
21 cat <<EOF
22Testsuite executable not found, please run:
23 cabal install --enable-tests --only-dependencies
24 cabal configure --enable-tests
25 cabal build
26EOF
27 exit;
28fi
30$SUITE $*
32EXCLUDES='Main
33Paths_servant-reflex
36EXCL=""
38for m in $EXCLUDES; do
39 EXCL="$EXCL --exclude=$m"
40done
42# TODO - actually send results to /dev/null when hpc kinks are fully removed
43echo "Call hpc:"
44echo hpc markup $EXCL --destdir=$DIR testsuite # >/dev/null 2>&1
45hpc markup $EXCL --destdir=$DIR testsuite # >/dev/null 2>&1
47echo "ls $DIR:"
48ls $DIR
50echo "ls:"
51ls
53cp -r $DIR out/
55cat <<EOF
58Test coverage report written to $HTMLDIR.
59EOF