Debian Codegraph @

test/testall

raw
1 #!/bin/sh
2
3 set -e
4
5 if [ -z "$DEBUG" ]; then
6 export DEBUG=shelly-testsuite
7 fi
8
9 SUITE=./dist/build/shelly-testsuite/shelly-testsuite
10
11 rm -f shelly-testsuite.tix
12 cabal build
13
14 if [ ! -f $SUITE ]; then
15 cat <<EOF
16 Testsuite executable not found, please run:
17 cabal configure --enable-tests
18 then
19 cabal build
20 Note this script should be run from the root of the checkout
21 EOF
22 exit;
23 fi
24
25 $SUITE $*
26
27 DIR=dist/hpc
28
29 rm -Rf $DIR
30 mkdir -p $DIR
31
32 EXCLUDES='TestMain
33 CopySpec
34 EnvSpec
35 FailureSpec
36 FindSpec
37 Help
38 Main
39 MoveSpec
40 ReadFileSpec
41 WhichSpec
42 WriteSpec
43 RunSpec
44 SshSpec
45 '
46
47 EXCL=""
48
49 for m in $EXCLUDES; do
50 EXCL="$EXCL --exclude=$m"
51 done
52
53 hpc markup $EXCL --destdir=$DIR shelly-testsuite >/dev/null 2>&1
54
55 cat <<EOF
56 Test coverage report written to $DIR.
57 EOF