1
0
mirror of https://github.com/facebook/zstd.git synced 2025-03-07 09:26:03 +02:00

Move stuff around

test execution -> travis
logic -> partialTests.sh
This commit is contained in:
George Lu 2018-06-05 15:20:34 -07:00
parent 0fd450af7b
commit 8e6267503b
2 changed files with 25 additions and 0 deletions

View 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'

24
tests/partialTests.sh Executable file
View File

@ -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"