From 624b1f93ccac4f385bfc721f921afcf2d64a8397 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Mon, 6 Jul 2009 13:05:07 -0400 Subject: [PATCH] tests: add verbose option to tests.sh Signed-off-by: Jean Privat --- tests/tests.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/tests/tests.sh b/tests/tests.sh index b975f51..6a797b4 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -26,15 +26,18 @@ usage() cat< /dev/null # Compile + if [ "x$verbose" = "xtrue" ]; then + echo "" + echo $NITC $OPT -o "$f.bin" "$i" -I . -I alt -I ../lib/standard + fi $NITC $OPT -o "$f.bin" "$i" -I . -I alt -I ../lib/standard 2> "$ff.cmp.err" > "$ff.compile.log" ERR=$? + if [ "x$verbose" = "xtrue" ]; then + cat "$ff.compile.log" + cat >&2 "$ff.cmp.err" + fi mv "$f.bin" "$ff.bin" 2> /dev/null egrep '^[A-Z0-9_]*$' "$ff.compile.log" > "$ff.res" if [ "$ERR" != 0 ]; then @@ -98,11 +109,19 @@ for ii in "$@"; do else args="" fi + if [ "x$verbose" = "xtrue" ]; then + echo "" + echo "./$ff.bin" $args + fi if [ -f "$f.inputs" ]; then "./$ff.bin" $args < "$f.inputs" > "$ff.res" 2>"$ff.err" else "./$ff.bin" $args > "$ff.res" 2>"$ff.err" fi + if [ "x$verbose" = "xtrue" ]; then + cat "$ff.res" + cat >&2 "$ff.err" + fi if [ -f "$ff.write" ]; then cat "$ff.write" >> "$ff.res" fi -- 1.7.9.5