X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=test%2Frun_tests.sh;h=c33f00e2a3ed3d3cdc3a53ca60ca1bc42573f458;hb=4daa23797d71debc7f85987f76ba2c69ef6cd8a1;hp=ea88cb05e12ea199d98ebe94b49015ed275f8cd7;hpb=4c61653db84fe75fc2bb8f5af9d1ac0343068b4c;p=bertos.git diff --git a/test/run_tests.sh b/test/run_tests.sh index ea88cb05..c33f00e2 100755 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -13,7 +13,7 @@ # 2 - build warnings # 3 - execution output # 4 - build commands -VERBOSE=${VERBOSE:-3} +VERBOSE=${VERBOSE:-1} CC=gcc #FIXME: -Ibertos/emul should not be needed @@ -24,7 +24,7 @@ CFLAGS="-W -Wall -Wextra -Wundef -Wpointer-arith -Wcast-qual -Wcast-align -Wwrit CXX=g++ CXXFLAGS="$CFLAGS" -TESTS?=${TESTS:-`find . \ +TESTS=${TESTS:-`find . \ \( -name .svn -prune -o -name .git -prune -o -name .hg -prune \) \ -o -name "*_test.c" -print` } @@ -94,19 +94,25 @@ for src in $TESTS; do [ $VERBOSE -gt 0 ] && echo "Preparing $name..." [ $VERBOSE -gt 4 ] && echo " $PREPARECMD" - if $PREPARECMD 2>&1 | tee >$buildout $testdir/$name.prep; then + if $PREPARECMD 2>&1 | tee -a >>$buildout $testdir/$name.prep; then [ $VERBOSE -gt 0 ] && echo "Building $name..." [ $VERBOSE -gt 4 ] && echo " $BUILDCMD" - if $BUILDCMD 2>&1 | tee >$buildout $testdir/$name.build; then + if $BUILDCMD 2>&1 | tee -a >>$buildout $testdir/$name.build; then [ $VERBOSE -gt 0 ] && echo "Running $name..." - if ! $exe 2>&1 | tee >$runout $testdir/$name.out; then + if ! $exe 2>&1 | tee -a >>$runout $testdir/$name.out; then echo "FAILED [RUN]: $name" + cat $testdir/$name.out + exit 2 fi else echo "FAILED [BUILD]: $name" + cat $testdir/$name.build + exit 3 fi else echo "FAILED [PREPARING]: $name" + cat $testdir/$name.prep + exit 4 fi done