Fix build files (#829)

This commit is contained in:
Eugene Kliuchnikov 2020-08-26 17:13:31 +02:00 committed by GitHub
parent 665e81dc9b
commit d052918255
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 44 additions and 23 deletions

11
.gitattributes vendored
View File

@ -26,6 +26,17 @@ c !export-ignore
c/** !export-ignore
c/common/dictionary.bin* export-ignore
c/fuzz export-ignore
scripts !export-ignore
scripts/sources.lst !export-ignore
scripts/libbrotli*.pc.in !export-ignore
tests !export-ignore
tests/*.sh !export-ignore
tests/*.cmake !export-ignore
tests/testdata !export-ignore
tests/testdata/empty !export-ignore
tests/testdata/empty.compressed !export-ignore
tests/testdata/ukkonooa !export-ignore
tests/testdata/ukkonooa.compressed !export-ignore
# Add man pages
docs !export-ignore

View File

@ -303,6 +303,7 @@ if(NOT BROTLI_DISABLE_TESTS)
set(OUTPUT_FILE "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_NAME}")
set(INPUT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${INPUT}")
if (EXISTS "${INPUT_FILE}")
foreach(quality 1 6 9 11)
add_test(NAME "${BROTLI_TEST_PREFIX}roundtrip/${INPUT}/${quality}"
COMMAND "${CMAKE_COMMAND}"
@ -314,6 +315,9 @@ if(NOT BROTLI_DISABLE_TESTS)
-DOUTPUT=${OUTPUT_FILE}.${quality}
-P ${CMAKE_CURRENT_SOURCE_DIR}/tests/run-roundtrip-test.cmake)
endforeach()
else()
message(WARNING "Test file ${INPUT} does not exist.")
endif()
endforeach()
file(GLOB_RECURSE

View File

@ -1,5 +1,9 @@
# !/bin/sh -e
if [ `uname -s` = "Darwin" ]; then
echo "WARNING: OSX autogen build is not supported"
fi
REQUIRED='is required, but not installed.'
bc -v >/dev/null 2>&1 || { echo >&2 "'bc' $REQUIRED"; exit 1; }
if [ `uname -s` != "FreeBSD" ]; then

View File

@ -20,6 +20,7 @@ c/dec/decode.c
"""
for file in $INPUTS; do
if [ -f $file ]; then
for quality in 1 6 9 11; do
echo "Roundtrip testing $file at quality $quality"
compressed=${TMP_DIR}/${file##*/}.br
@ -31,4 +32,5 @@ for file in $INPUTS; do
cat $file | $BROTLI -cq $quality | $BROTLI -cd >$uncompressed
diff -q $file $uncompressed
done
fi
done