Revision aab3ea5f

View differences:

Makefile
279 279

  
280 280
ifdef SAMPLES
281 281
fate: $(FATE_TESTS)
282
$(FATE_TESTS): ffmpeg$(EXESUF)
282
$(FATE_TESTS): ffmpeg$(EXESUF) tests/tiny_psnr$(HOSTEXESUF)
283 283
	@echo "TEST FATE   $(@:fate-%=%)"
284 284
	@$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)'
285 285
else
tests/fate-run.sh
15 15
outdir="tests/data/fate"
16 16
outfile="${outdir}/${test}"
17 17

  
18
oneoff(){
19
    psnr=$(tests/tiny_psnr "$1" "$2" 2 0 0)
20
    max=$(expr "$psnr" : '.*MAXDIFF: *\([0-9]*\)')
21
    if [ $max -gt ${3:-1} ]; then
22
        echo "$psnr"
23
        return 1
24
    fi
25
}
26

  
18 27
mkdir -p "$outdir"
19 28

  
20 29
eval $target_exec $command > "$outfile" 2>/dev/null
21 30

  
22 31
case $cmp in
23 32
    diff)   diff -u -w "$ref" "$outfile"            ;;
33
    oneoff) oneoff     "$ref" "$outfile" "$fuzz"    ;;
24 34
esac

Also available in: Unified diff