diff options
Diffstat (limited to 'tests/fate-run.sh')
-rwxr-xr-x | tests/fate-run.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 47649f4..b3f1b68 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -60,11 +60,21 @@ 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/"$@" } +probefmt(){ + run ffprobe -show_format_entry format_name -v 0 "$@" +} + avconv(){ run ffmpeg -nostats -threads $threads -thread_type $thread_type -cpuflags $cpuflags "$@" } @@ -151,11 +161,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=$? |