]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Move stuff around
authorGeorge Lu <gclu@fb.com>
Tue, 5 Jun 2018 22:20:34 +0000 (15:20 -0700)
committerGeorge Lu <gclu@fb.com>
Tue, 5 Jun 2018 22:20:34 +0000 (15:20 -0700)
test execution -> travis
logic -> partialTests.sh

.travis.yml
tests/partialTests.sh [new file with mode: 0755]

index a9c1db525f386695f1cb3abd99f3e22d9b623d6e..8d1033022f55732f56c10817192536d93f03cd6f 100644 (file)
@@ -31,6 +31,7 @@ matrix:
 
     - env: Cmd='make lz4install && make -C tests test-lz4'
 
+    - env: Cmd='bash tests/partialTests.sh'
     # tag-specific test
     - if: tag =~ ^v[0-9]\.[0-9]
       env: Cmd='make -C tests checkTag && tests/checkTag $TRAVIS_BRANCH'
diff --git a/tests/partialTests.sh b/tests/partialTests.sh
new file mode 100755 (executable)
index 0000000..3ee3cc5
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh -e
+
+die() {
+    $ECHO "$@" 1>&2
+    exit 1
+}
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+INTOVOID="/dev/null"
+case "$OS" in
+  Windows*)
+    INTOVOID="NUL"
+    ;;
+esac
+
+ZSTD_LIB_COMPRESSION=0 CFLAGS= make -C $DIR/../lib libzstd.a > $INTOVOID
+nm $DIR/../lib/libzstd.a | grep ".*\.o:" > tmplog
+! grep -q "zstd_compress" tmplog && grep -q "zstd_decompress" tmplog && ! grep -q "dict" tmplog && grep -q "zstd_v" tmplog && make clean && rm -f tmplog || die "Compression macro failed"
+
+
+ZSTD_LIB_DECOMPRESSION=0 CFLAGS= make -C $DIR/../lib libzstd.a > $INTOVOID
+nm $DIR/../lib/libzstd.a | grep ".*\.o:" > tmplog
+grep -q "zstd_compress" tmplog && ! grep -q "zstd_decompress" tmplog && grep -q "dict" tmplog && ! grep -q "zstd_v" tmplog && make clean && rm -f tmplog || die "Decompression macro failed"
\ No newline at end of file