diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2022-10-27 01:12:40 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2022-10-27 01:12:40 +0300 |
commit | c1dd8524e1af07f16b790463899de06a6a5fcc08 (patch) | |
tree | 1471d6d3a99d367fc0f397dc0d2c71f1920f23cb /tests | |
parent | Tests: test_bcj_exact_size skips properly now if PowerPC filter disabled. (diff) | |
download | xz-c1dd8524e1af07f16b790463899de06a6a5fcc08.tar.xz |
Tests: Keep test_compress_* working when some filters are unavailable.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test_compress.sh | 34 |
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 |