Restore pipefail.
[bertos.git] / test / run_tests.sh
index 9034ac92f0e7df3eb590e173132beb9b2a62ff49..c33f00e2a3ed3d3cdc3a53ca60ca1bc42573f458 100755 (executable)
@@ -63,7 +63,7 @@ SRC_LIST="
        bertos/cfg/kfile_debug.c
        bertos/io/kblock.c
        bertos/io/kblock_ram.c
-       bertos/io/kblock_file.c
+       bertos/io/kblock_posix.c
        bertos/io/kfile.c
 "
 
@@ -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