summaryrefslogtreecommitdiff
path: root/run-test-suite.sh
diff options
context:
space:
mode:
authorAndor Penzes <andor.penzes@gmail.com>2016-01-07 10:58:59 +0100
committerAndor Penzes <andor.penzes@gmail.com>2016-01-07 10:59:06 +0100
commitb63c48d05c0f6776e0242d5bf78fbc16936cf91d (patch)
tree56e5890e9ebb7da8cf03dc20402a14407f1efb1e /run-test-suite.sh
parent0b772048f6d54535f04b5580e70af80362d75ecb (diff)
unit tests are now in an exectable
Diffstat (limited to 'run-test-suite.sh')
-rwxr-xr-xrun-test-suite.sh20
1 files changed, 16 insertions, 4 deletions
diff --git a/run-test-suite.sh b/run-test-suite.sh
index 9cd2cc2a..cbe1fe56 100755
--- a/run-test-suite.sh
+++ b/run-test-suite.sh
@@ -9,7 +9,7 @@ if [ "$1" == "--profile" ] ; then
9 cabal configure --flags "profiling" --enable-library-profiling --enable-executable-profiling 9 cabal configure --flags "profiling" --enable-library-profiling --enable-executable-profiling
10 cabal build 10 cabal build
11 set +e 11 set +e
12 cabal test --show-details=streaming 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-test-suite -- -r $@ +RTS -p
15 RESULT_TESTS=`echo $?` 15 RESULT_TESTS=`echo $?`
@@ -17,15 +17,27 @@ if [ "$1" == "--profile" ] ; then
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
20 exit $((RESULT_TESTS + RESULT_UNITTESTS))
21else 20else
22 set +e 21 set +e
23 cabal install --only-dependencies -j1 22 cabal install --only-dependencies -j1
24 cabal test --show-details=streaming 23 cabal run lambdacube-compiler-unit-tests
25 RESULT_UNITTESTS=`echo $?` 24 RESULT_UNITTESTS=`echo $?`
26 cabal run lambdacube-compiler-test-suite -- -r $@ 25 cabal run lambdacube-compiler-test-suite -- -r $@
27 RESULT_TESTS=`echo $?` 26 RESULT_TESTS=`echo $?`
28 ./create-test-report.sh 27 ./create-test-report.sh
29 rm lambdacube-compiler-test-suite.tix 28 rm lambdacube-compiler-test-suite.tix
30 exit $((RESULT_TESTS + RESULT_UNITTESTS))
31fi 29fi
30
31if [[ $RESULT_UNITTESTS -ne 0 ]]; then
32 echo "***************************"
33 echo "* Unit tests are failing. *"
34 echo "***************************"
35fi
36
37if [[ $RESULT_TESTS -ne 0 ]]; then
38 echo "*******************************"
39 echo "* Compiler tests are failing. *"
40 echo "*******************************"
41fi
42
43exit $((RESULT_TESTS + RESULT_UNITTESTS))