diff options
author | Mans Rullgard <mans@mansr.com> | 2012-05-03 15:43:11 -0700 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2012-05-07 10:14:50 -0700 |
commit | 40fa14f7755f601478aed831d77c2c1d37f564b4 (patch) | |
tree | 2c1493a0c8e1671245d4b7127db8a0961d4fb410 /tests/fate-run.sh | |
parent | 64953f67f98da2e787aeb45cc7f504390fa32a69 (diff) | |
download | ffmpeg-40fa14f7755f601478aed831d77c2c1d37f564b4.tar.gz |
fate: Add oneline comparison method
Signed-off-by: Alex Converse <alex.converse@gmail.com>
Diffstat (limited to 'tests/fate-run.sh')
-rwxr-xr-x | 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 f7a7abaa76..8097eec426 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=$? |