From cf95fbb9c5ef348902f74d989bc8167c08ae9bc5 Mon Sep 17 00:00:00 2001 From: Evgenii Kliuchnikov Date: Mon, 11 Sep 2023 07:08:16 -0700 Subject: reword cmake test generator warning PiperOrigin-RevId: 564371898 --- CMakeLists.txt | 2 +- tests/Makefile | 17 ----------------- tests/compatibility_test.sh | 25 ------------------------- tests/roundtrip_test.sh | 36 ------------------------------------ 4 files changed, 1 insertion(+), 79 deletions(-) delete mode 100644 tests/Makefile delete mode 100755 tests/compatibility_test.sh delete mode 100755 tests/roundtrip_test.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 84a1494..2400230 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/tests/Makefile b/tests/Makefile deleted file mode 100644 index 28da198..0000000 --- a/tests/Makefile +++ /dev/null @@ -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 diff --git a/tests/compatibility_test.sh b/tests/compatibility_test.sh deleted file mode 100755 index c5af8bf..0000000 --- a/tests/compatibility_test.sh +++ /dev/null @@ -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 diff --git a/tests/roundtrip_test.sh b/tests/roundtrip_test.sh deleted file mode 100755 index 0a0b910..0000000 --- a/tests/roundtrip_test.sh +++ /dev/null @@ -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 -- cgit v1.1