aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/test_compress.sh34
1 files changed, 20 insertions, 14 deletions
diff --git a/tests/test_compress.sh b/tests/test_compress.sh
index 128ef854..0692a8b1 100755
--- a/tests/test_compress.sh
+++ b/tests/test_compress.sh
@@ -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