File: runTestsAndCoverage.sh

package info (click to toggle)
haskell-snap-core 1.0.5.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 812 kB
  • sloc: haskell: 7,668; sh: 47; ansic: 26; makefile: 2
file content (62 lines) | stat: -rw-r--r-- 1,243 bytes parent folder | download | duplicates (6)
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
60
61
62
#!/bin/sh

set -e

export LC_ALL=C
export LANG=C

rm -f testsuite.tix

# TODO How do we find the executable without knowing the version number in dist-newstyle?
./dist-newstyle/build/snap-core-1.0.0.0/build/testsuite/testsuite -j4 -a1000 $*

DIR="./dist-newstyle/hpc"

rm -Rf $DIR
mkdir -p $DIR
mkdir -p out

# NOTE
# Snap.Internal.Util.FileUploads shouldn't be in the excludes list. This is a
# temporary workaround so we can release.

EXCLUDES='Main
Snap.Core.Tests
Snap.Internal.Debug
Snap.Internal.Http.Parser.Tests
Snap.Internal.Http.Server.Tests
Snap.Internal.Http.Types.Tests
Snap.Internal.Parsing.Tests
Snap.Internal.Routing.Tests
Snap.Internal.Test.Assertions
Snap.Internal.Test.RequestBuilder
Snap.Internal.Util.FileUploads
Snap.Test
Snap.Test.Common
Snap.Test.Tests
Snap.Types.Tests
Snap.Types.Headers.Tests
Snap.Util.FileServe.Tests
Snap.Util.FileUploads.Tests
Snap.Util.GZip.Tests
Snap.Util.Proxy.Tests
Snap.Util.Readable.Tests
Text.Snap.Templates.Tests'

EXCL=""

for m in $EXCLUDES; do
    EXCL="$EXCL --exclude=$m"
done

hpc markup $EXCL --destdir=$DIR testsuite

rm -f testsuite.tix

#TODO only copy hpc results if this script is called from deploy_hpc.sh
cp -r $DIR out/

cat <<EOF

Test coverage report written to $DIR.
EOF