diff options
Diffstat (limited to 'tests/roundtrip_test.sh')
-rwxr-xr-x | tests/roundtrip_test.sh | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/tests/roundtrip_test.sh b/tests/roundtrip_test.sh index 90027af..0a0b910 100755 --- a/tests/roundtrip_test.sh +++ b/tests/roundtrip_test.sh @@ -20,15 +20,17 @@ c/dec/decode.c """ for file in $INPUTS; do - for quality in 1 6 9 11; do - echo "Roundtrip testing $file at quality $quality" - compressed=${TMP_DIR}/${file##*/}.br - uncompressed=${TMP_DIR}/${file##*/}.unbr - $BROTLI -fq $quality $file -o $compressed - $BROTLI $compressed -fdo $uncompressed - diff -q $file $uncompressed - # Test the streaming version - cat $file | $BROTLI -cq $quality | $BROTLI -cd >$uncompressed - diff -q $file $uncompressed - done + if [ -f $file ]; then + for quality in 1 6 9 11; do + echo "Roundtrip testing $file at quality $quality" + compressed=${TMP_DIR}/${file##*/}.br + uncompressed=${TMP_DIR}/${file##*/}.unbr + $BROTLI -fq $quality $file -o $compressed + $BROTLI $compressed -fdo $uncompressed + diff -q $file $uncompressed + # Test the streaming version + cat $file | $BROTLI -cq $quality | $BROTLI -cd >$uncompressed + diff -q $file $uncompressed + done + fi done |