reword cmake test generator warning

PiperOrigin-RevId: 564371898
This commit is contained in:
Evgenii Kliuchnikov 2023-09-11 07:08:16 -07:00 committed by Copybara-Service
parent e8569f79fc
commit cf95fbb9c5
4 changed files with 1 additions and 79 deletions

View File

@ -261,7 +261,7 @@ if(NOT BROTLI_DISABLE_TESTS)
-P ${CMAKE_CURRENT_SOURCE_DIR}/tests/run-roundtrip-test.cmake)
endforeach()
else()
message(WARNING "Test file ${INPUT} does not exist.")
message(NOTICE "Test file ${INPUT} does not exist; OK on tarball builds")
endif()
endforeach()

View File

@ -1,17 +0,0 @@
#brotli/tests
BROTLI = ..
all: test
test: deps
./compatibility_test.sh
./roundtrip_test.sh
deps :
$(MAKE) -C $(BROTLI) brotli
clean :
rm -f testdata/*.{br,unbr,uncompressed}
rm -f $(BROTLI)/{enc,dec,tools}/*.{un,}br
$(MAKE) -C $(BROTLI)/tools clean

View File

@ -1,25 +0,0 @@
#!/usr/bin/env bash
#
# Test that the brotli command-line tool can decompress old brotli-compressed
# files.
#
# The first argument may be a wrapper for brotli, such as 'qemu-arm'.
set -o errexit
BROTLI_WRAPPER=$1
BROTLI="${BROTLI_WRAPPER} bin/brotli"
TMP_DIR=bin/tmp
for file in tests/testdata/*.compressed*; do
echo "Testing decompression of file $file"
expected=${file%.compressed*}
uncompressed=${TMP_DIR}/${expected##*/}.uncompressed
echo $uncompressed
$BROTLI $file -fdo $uncompressed
diff -q $uncompressed $expected
# Test the streaming version
cat $file | $BROTLI -dc > $uncompressed
diff -q $uncompressed $expected
rm -f $uncompressed
done

View File

@ -1,36 +0,0 @@
#!/usr/bin/env bash
#
# Roundtrip test for the brotli command-line tool.
#
# The first argument may be a wrapper for brotli, such as 'qemu-arm'.
set -o errexit
BROTLI_WRAPPER=$1
BROTLI="${BROTLI_WRAPPER} bin/brotli"
TMP_DIR=bin/tmp
INPUTS="""
tests/testdata/alice29.txt
tests/testdata/asyoulik.txt
tests/testdata/lcet10.txt
tests/testdata/plrabn12.txt
c/enc/encode.c
c/common/dictionary.h
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
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