1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00

Tests: Keep test_compress_* working when some filters are unavailable.

This commit is contained in:
Lasse Collin 2022-10-27 01:12:40 +03:00
parent ce30ada919
commit c1dd8524e1

View file

@ -77,7 +77,9 @@ test_xz() {
} }
XZ="../src/xz/xz --memlimit-compress=48MiB --memlimit-decompress=5MiB \ XZ="../src/xz/xz --memlimit-compress=48MiB --memlimit-decompress=5MiB \
--no-adjust --threads=1 --check=crc64" --no-adjust --threads=1 --check=crc32"
grep "define HAVE_CHECK_CRC64" ../config.h > /dev/null \
&& XZ="$XZ --check=crc64"
XZDEC="../src/xzdec/xzdec" # No memory usage limiter available XZDEC="../src/xzdec/xzdec" # No memory usage limiter available
test -x ../src/xzdec/xzdec || XZDEC= test -x ../src/xzdec/xzdec || XZDEC=
@ -118,18 +120,22 @@ test_xz -2
test_xz -3 test_xz -3
test_xz -4 test_xz -4
for ARGS in \ test_filter()
--delta=dist=1 \ {
--delta=dist=4 \ grep "define HAVE_ENCODER_$1" ../config.h > /dev/null || return
--delta=dist=256 \ grep "define HAVE_DECODER_$1" ../config.h > /dev/null || return
--x86 \ shift
--powerpc \ test_xz "$@" --lzma2=dict=64KiB,nice=32,mode=fast
--ia64 \ }
--arm \
--armthumb \ test_filter DELTA --delta=dist=1
--sparc test_filter DELTA --delta=dist=4
do test_filter DELTA --delta=dist=256
test_xz $ARGS --lzma2=dict=64KiB,nice=32,mode=fast test_filter X86 --x86
done test_filter POWERPC --power
test_filter IA64 --ia64
test_filter ARM --arm
test_filter ARMTHUMB --armthumb
test_filter SPARC --sparc
exit 0 exit 0