[FFmpeg-cvslog] fate: Add oneline comparison method

Mans Rullgard git at videolan.org
Tue May 8 22:07:19 CEST 2012


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Thu May  3 15:43:11 2012 -0700| [40fa14f7755f601478aed831d77c2c1d37f564b4] | committer: Alex Converse

fate: Add oneline comparison method

Signed-off-by: Alex Converse <alex.converse at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=40fa14f7755f601478aed831d77c2c1d37f564b4
---

 tests/fate-run.sh |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index f7a7aba..8097eec 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -60,6 +60,12 @@ stddev(){
     do_tiny_psnr "$1" "$2" stddev
 }
 
+oneline(){
+    val=$(cat "$2")
+    test x"$val" = x"$1" || { r=$?; printf -- '-%s\n+%s\n' "$ref" "$val"; }
+    return ${r:-0}
+}
+
 run(){
     test "${V:-0}" -gt 0 && echo "$target_exec" $target_path/"$@" >&3
     $target_exec $target_path/"$@"
@@ -147,11 +153,12 @@ if [ $err -gt 128 ]; then
     test "${sig}" = "${sig%[!A-Za-z]*}" || unset sig
 fi
 
-if test -e "$ref"; then
+if test -e "$ref" || test $cmp = "oneline" ; then
     case $cmp in
         diff)   diff -u -w "$ref" "$outfile"            >$cmpfile ;;
         oneoff) oneoff     "$ref" "$outfile"            >$cmpfile ;;
         stddev) stddev     "$ref" "$outfile"            >$cmpfile ;;
+        oneline)oneline    "$ref" "$outfile"            >$cmpfile ;;
         null)   cat               "$outfile"            >$cmpfile ;;
     esac
     cmperr=$?



More information about the ffmpeg-cvslog mailing list