ash tests: make test print test name before it is run
authorDenys Vlasenko <vda.linux@googlemail.com>
Thu, 29 Oct 2015 19:29:05 +0000 (20:29 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 29 Oct 2015 19:34:20 +0000 (20:34 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash_test/run-all

index ad93e251d033b9bca2a8c0ab538d52a389825bff..354cc1fcf0c8afd81d8a218d84cb5bd7795b3c5d 100755 (executable)
@@ -31,8 +31,9 @@ do_test()
            *.orig|*~) ;;
            #*) echo $x ; sh $x ;;
            *)
+           echo -n "$1/$x: "
            sh "$x" >"$TOPDIR/$noslash-$x.fail" 2>&1 && \
-           { echo "$1/$x: ok"; rm "$TOPDIR/$noslash-$x.fail"; } || echo "$1/$x: fail";
+           { echo "ok"; rm "$TOPDIR/$noslash-$x.fail"; } || echo "fail";
            ;;
        esac
     done
@@ -42,11 +43,12 @@ do_test()
        test -x "$x" || continue
        name="${x%%.tests}"
        test -f "$name.right" || continue
+       echo -n "$1/$x: "
        {
            "$THIS_SH" "./$x" >"$name.xx" 2>&1
            diff -u "$name.xx" "$name.right" >"$TOPDIR/$noslash-$x.fail" \
            && rm -f "$name.xx" "$TOPDIR/$noslash-$x.fail"
-       } && echo "$1/$x: ok" || echo "$1/$x: fail"
+       } && echo "ok" || echo "fail"
     done
     )
 }