From c4795e8069cf6867a59e94b1d9f258d733fb4c53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Rullg=C3=A5rd?= Date: Thu, 23 Sep 2010 09:55:31 +0000 Subject: [PATCH] fate: print commands being executed with V=1 Originally committed as revision 25161 to svn://svn.ffmpeg.org/ffmpeg/trunk --- tests/fate-run.sh | 2 ++ tests/regression-funcs.sh | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 8117c453fc..c4a9a13e11 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -43,6 +43,7 @@ stddev(){ } run(){ + test "${V:-0}" -gt 0 && echo "$target_exec" $target_path/"$@" >&3 $target_exec $target_path/"$@" } @@ -109,6 +110,7 @@ seektest(){ mkdir -p "$outdir" +exec 3>&2 $command > "$outfile" 2>$errfile err=$? diff --git a/tests/regression-funcs.sh b/tests/regression-funcs.sh index 970485c87e..28da0c1303 100755 --- a/tests/regression-funcs.sh +++ b/tests/regression-funcs.sh @@ -41,9 +41,15 @@ mkdir -p "$datadir" mkdir -p "$outfile" mkdir -p "$logdir" -[ "${V-0}" -gt 0 ] && echov=echo || echov=: +(exec >&3) 2>/dev/null || exec 3>&2 + +[ "${V-0}" -gt 0 ] && echov=echov || echov=: [ "${V-0}" -gt 1 ] || exec 2>$errfile +echov(){ + echo "$@" >&3 +} + . $(dirname $0)/md5.sh FFMPEG_OPTS="-v 0 -y -flags +bitexact -dct fastint -idct simple -sws_flags +accurate_rnd+bitexact" -- GitLab