]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Improved tests
authorYann Collet <cyan@fb.com>
Wed, 13 Dec 2017 19:48:30 +0000 (11:48 -0800)
committerYann Collet <cyan@fb.com>
Wed, 13 Dec 2017 19:48:30 +0000 (11:48 -0800)
- building cli from /tests preserves potential flags in MOREFLAGS (such as asan/usan)
- MT dictionary tests check for MT capability (MT is not enabled by default for zstd32)

tests/Makefile
tests/playTests.sh

index faa7d019c374338912760175cbffb15580e2eb23..853f4ee89b195a0cbe6235e41016d3233836a2a0 100644 (file)
@@ -76,13 +76,13 @@ allnothread: fullbench fuzzer paramgrill datagen decodecorpus
 dll: fuzzer-dll zstreamtest-dll
 
 zstd:
-       $(MAKE) -C $(PRGDIR) $@ MOREFLAGS="$(DEBUGFLAGS)"
+       $(MAKE) -C $(PRGDIR) $@ MOREFLAGS+="$(DEBUGFLAGS)"
 
 zstd32:
-       $(MAKE) -C $(PRGDIR) $@ MOREFLAGS="$(DEBUGFLAGS)"
+       $(MAKE) -C $(PRGDIR) $@ MOREFLAGS+="$(DEBUGFLAGS)"
 
 zstd-nolegacy:
-       $(MAKE) -C $(PRGDIR) $@ MOREFLAGS="$(DEBUGFLAGS)"
+       $(MAKE) -C $(PRGDIR) $@ MOREFLAGS+="$(DEBUGFLAGS)"
 
 gzstd:
        $(MAKE) -C $(PRGDIR) zstd HAVE_ZLIB=1 MOREFLAGS="$(DEBUGFLAGS)"
index 6b78b305ac8ac5ee5efe3498d703bc39426674f2..67732d3a15b5c39b03f104f6c77212866487317f 100755 (executable)
@@ -297,8 +297,11 @@ cp $TESTFILE tmp
 $ZSTD -f tmp -D tmpDict
 $ZSTD -d tmp.zst -D tmpDict -fo result
 $DIFF $TESTFILE result
-$ECHO "- Test dictionary compression with multithreading "
-./datagen -g5M | $ZSTD -T2 -D tmpDict | $ZSTD -t -D tmpDict   # fails with v1.3.2 
+if [ -n "$hasMT" ]
+then
+    $ECHO "- Test dictionary compression with multithreading "
+    ./datagen -g5M | $ZSTD -T2 -D tmpDict | $ZSTD -t -D tmpDict   # fails with v1.3.2 
+fi
 $ECHO "- Create second (different) dictionary "
 $ZSTD --train *.c ../programs/*.c ../programs/*.h -o tmpDictC
 $ZSTD -d tmp.zst -D tmpDictC -fo result && die "wrong dictionary not detected!"