-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathrunTestsAndCoverage.sh
executable file
·59 lines (42 loc) · 994 Bytes
/
runTestsAndCoverage.sh
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/sh
set -e
# All directory variables relative to project root
# DIR=dist-newstyle/hpc
DIR=./dist/hpc
#SUITE=./dist-newstyle/build/servant-reflex-0.2/build/testsuite/testsuite
SUITE=./dist/build/testsuite/testsuite
if [ -z "$DEBUG" ]; then
export DEBUG=snap-testsuite
fi
rm -f testsuite.tix
rm -rf "$DIR"
mkdir -p "$DIR"
if [ ! -f $SUITE ]; then
cat <<EOF
Testsuite executable not found, please run:
cabal install --enable-tests --only-dependencies
cabal configure --enable-tests
cabal build
EOF
exit;
fi
$SUITE $*
EXCLUDES='Main
Paths_servant-reflex
'
EXCL=""
for m in $EXCLUDES; do
EXCL="$EXCL --exclude=$m"
done
# TODO - actually send results to /dev/null when hpc kinks are fully removed
echo "Call hpc:"
echo hpc markup $EXCL --destdir=$DIR testsuite # >/dev/null 2>&1
hpc markup $EXCL --destdir=$DIR testsuite # >/dev/null 2>&1
echo "ls $DIR:"
ls $DIR
echo "ls:"
ls
cp -r $DIR out/
cat <<EOF
Test coverage report written to $HTMLDIR.
EOF