File: test-all

package info (click to toggle)
haskell-hinotify 0.3.5-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 168 kB
  • sloc: haskell: 271; sh: 25; makefile: 6
file content (31 lines) | stat: -rwxr-xr-x 552 bytes parent folder | download | duplicates (2)
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
#!/bin/bash

GHC=ghc

if [[ -n $1 ]]; then
    GHC="$1"
    echo Using GHC: $GHC
fi

TESTS=( `ls test*.hs | cut -d. -f1` )

rm -rf *.o *.hi

for t in ${TESTS[@]}; do
    rm -rf $t{,.o,.hi}
    rm -rf $t-playground
    $GHC -v0 --make $t.hs -o $t
    echo -n Testing $t ...
    if [[ -x $t ]]; then
        ./$t
        exitCode=$?
        if [[ $exitCode == 0 ]]; then
            echo Success
            rm -rf $t{,.o,.hi}
        else
            echo Failure with exit code $exitCode
        fi
    else
        echo Compilation failed
    fi
done