summaryrefslogtreecommitdiff
path: root/run-test-suite.sh
diff options
context:
space:
mode:
authorAndor Penzes <andor.penzes@gmail.com>2016-01-09 20:31:14 +0100
committerAndor Penzes <andor.penzes@gmail.com>2016-01-09 20:31:14 +0100
commit69650452f373514df079cd841f2dff414ba127df (patch)
tree4e2ae6b7580d362621af6c54a638ebc0bae5b028 /run-test-suite.sh
parenta86447b6eb336eb451ba2f1e905100833097b8d0 (diff)
separate coverage test suite
Diffstat (limited to 'run-test-suite.sh')
-rwxr-xr-xrun-test-suite.sh17
1 files changed, 13 insertions, 4 deletions
diff --git a/run-test-suite.sh b/run-test-suite.sh
index cbe1fe56..88889a34 100755
--- a/run-test-suite.sh
+++ b/run-test-suite.sh
@@ -6,17 +6,28 @@ if [ "$1" == "--profile" ] ; then
6 cabal sandbox delete 6 cabal sandbox delete
7 cabal sandbox init 7 cabal sandbox init
8 cabal install --only-dependencies --enable-library-profiling --enable-executable-profiling --constraint="indentation -trifecta" 8 cabal install --only-dependencies --enable-library-profiling --enable-executable-profiling --constraint="indentation -trifecta"
9 cabal configure --flags "profiling" --enable-library-profiling --enable-executable-profiling 9 cabal configure --flags "profiling coverage" --enable-library-profiling --enable-executable-profiling
10 cabal build 10 cabal build
11 set +e 11 set +e
12 cabal run lambdacube-compiler-unit-tests 12 cabal run lambdacube-compiler-unit-tests
13 RESULT_UNITTESTS=`echo $?` 13 RESULT_UNITTESTS=`echo $?`
14 cabal run lambdacube-compiler-test-suite -- -r $@ +RTS -p 14 cabal run lambdacube-compiler-coverage-test-suite -- -r $@ +RTS -p
15 RESULT_TESTS=`echo $?` 15 RESULT_TESTS=`echo $?`
16 ./create-test-report.sh 16 ./create-test-report.sh
17 rm lambdacube-compiler-test-suite.tix 17 rm lambdacube-compiler-test-suite.tix
18 cabal sandbox delete 18 cabal sandbox delete
19 cabal clean 19 cabal clean
20elif [ "$1" == "--coverage" ] ; then
21 shift
22 set +e
23 cabal install --only-dependencies -j1
24 cabal configure --flags "coverage"
25 cabal run lambdacube-compiler-unit-tests
26 RESULT_UNITTESTS=`echo $?`
27 cabal run lambdacube-compiler-coverage-test-suite -- -r $@
28 RESULT_TESTS=`echo $?`
29 ./create-test-report.sh
30 rm lambdacube-compiler-coverage-test-suite.tix
20else 31else
21 set +e 32 set +e
22 cabal install --only-dependencies -j1 33 cabal install --only-dependencies -j1
@@ -24,8 +35,6 @@ else
24 RESULT_UNITTESTS=`echo $?` 35 RESULT_UNITTESTS=`echo $?`
25 cabal run lambdacube-compiler-test-suite -- -r $@ 36 cabal run lambdacube-compiler-test-suite -- -r $@
26 RESULT_TESTS=`echo $?` 37 RESULT_TESTS=`echo $?`
27 ./create-test-report.sh
28 rm lambdacube-compiler-test-suite.tix
29fi 38fi
30 39
31if [[ $RESULT_UNITTESTS -ne 0 ]]; then 40if [[ $RESULT_UNITTESTS -ne 0 ]]; then