From: George Lu Date: Tue, 5 Jun 2018 22:20:34 +0000 (-0700) Subject: Move stuff around X-Git-Tag: v1.3.5~3^2~29^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e6267503bb9dce52af630665236bfdf03fce773;p=thirdparty%2Fzstd.git Move stuff around test execution -> travis logic -> partialTests.sh --- diff --git a/.travis.yml b/.travis.yml index a9c1db525..8d1033022 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 index 000000000..3ee3cc5bc --- /dev/null +++ b/tests/partialTests.sh @@ -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