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 \
--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
test -x ../src/xzdec/xzdec || XZDEC=
@ -118,18 +120,22 @@ test_xz -2
test_xz -3
test_xz -4
for ARGS in \
--delta=dist=1 \
--delta=dist=4 \
--delta=dist=256 \
--x86 \
--powerpc \
--ia64 \
--arm \
--armthumb \
--sparc
do
test_xz $ARGS --lzma2=dict=64KiB,nice=32,mode=fast
done
test_filter()
{
grep "define HAVE_ENCODER_$1" ../config.h > /dev/null || return
grep "define HAVE_DECODER_$1" ../config.h > /dev/null || return
shift
test_xz "$@" --lzma2=dict=64KiB,nice=32,mode=fast
}
test_filter DELTA --delta=dist=1
test_filter DELTA --delta=dist=4
test_filter DELTA --delta=dist=256
test_filter X86 --x86
test_filter POWERPC --power
test_filter IA64 --ia64
test_filter ARM --arm
test_filter ARMTHUMB --armthumb
test_filter SPARC --sparc
exit 0