Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
terrelln committed Oct 18, 2017
1 parent f4340f4 commit 2d1b4c0
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 45 deletions.
29 changes: 2 additions & 27 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,6 @@ sudo: required
dist: trusty
matrix:
include:
# Ubuntu 14.04
- env: Cmd="make cxxtest && make clean && make gnu90build && make clean && make cmakebuild && make clean && make travis-install"

- env: Cmd='make gcc6install && CC=gcc-6 make clean uasan-test'
- env: Cmd='make gcc6install libc6install && CC=gcc-6 make clean uasan-test32'
- env: Cmd='make clang38install && CC=clang-3.8 make clean msan-test'
- env: Cmd='make clang38install && CC=clang-3.8 make clean tsan-test-zstream'
- env: Cmd='make valgrindinstall && make -C tests clean valgrindTest'

- env: Cmd='make arminstall && make armtest'
- env: Cmd='make arminstall && make aarch64test'
- env: Cmd='make ppcinstall && make ppctest'
- env: Cmd='make ppcinstall && make ppc64test'

- env: Cmd='make gpp6install valgrindinstall && make -C zlibWrapper test && make -C zlibWrapper valgrindTest'
- env: Cmd='make gcc6install && CC=gcc-6 make uasan-test-zstd-nolegacy'
- env: Cmd='make gcc6install && CC=gcc-6 make uasan-test-zbuff'

- env: Cmd='make -j uasanregressiontest'
- env: Cmd='make -j msanregressiontest'

- env: Cmd='make -C tests versionsTest && make lz4install && make clean && make -C tests test-lz4'

# OS X Mavericks
- env: Cmd="make test"
os: osx
Expand All @@ -52,8 +29,6 @@ script:
- export FUZZERTEST=-T5mn;
export ZSTREAM_TESTTIME=-T2mn;
export DECODECORPUS_TESTTIME=-T1mn;
if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then
git fetch origin dev;
git checkout -f FETCH_HEAD;
fi;
git fetch origin dev;
git checkout -f FETCH_HEAD;
sh -c "$Cmd" || travis_terminate 1;
36 changes: 18 additions & 18 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -295,48 +295,48 @@ test-gzstd: gzstd
$(RM) *.gz *.zst README2.md gz_zstd zstd_gz hello.txt

test-fullbench: fullbench datagen
$(QEMU_SYS) ./fullbench -i1
$(QEMU_SYS) ./fullbench -i1 -P0
echo -n "XXX"; date; $(QEMU_SYS) ./fullbench -i1
echo -n "XXX"; date; $(QEMU_SYS) ./fullbench -i1 -P0

test-fullbench32: fullbench32 datagen
$(QEMU_SYS) ./fullbench32 -i1
$(QEMU_SYS) ./fullbench32 -i1 -P0
echo -n "XXX"; date; $(QEMU_SYS) ./fullbench32 -i1
echo -n "XXX"; date; $(QEMU_SYS) ./fullbench32 -i1 -P0

test-fuzzer: fuzzer
$(QEMU_SYS) ./fuzzer $(FUZZERTEST) $(FUZZER_FLAGS)
echo -n "XXX"; date; $(QEMU_SYS) ./fuzzer $(FUZZERTEST) $(FUZZER_FLAGS)

test-fuzzer32: fuzzer32
$(QEMU_SYS) ./fuzzer32 $(FUZZERTEST) $(FUZZER_FLAGS)
echo -n "XXX"; date; $(QEMU_SYS) ./fuzzer32 $(FUZZERTEST) $(FUZZER_FLAGS)

test-zbuff: zbufftest
$(QEMU_SYS) ./zbufftest $(ZSTREAM_TESTTIME)
echo -n "XXX"; date; $(QEMU_SYS) ./zbufftest $(ZSTREAM_TESTTIME)

test-zbuff32: zbufftest32
$(QEMU_SYS) ./zbufftest32 $(ZSTREAM_TESTTIME)
echo -n "XXX"; date; $(QEMU_SYS) ./zbufftest32 $(ZSTREAM_TESTTIME)

test-zstream: zstreamtest
$(QEMU_SYS) ./zstreamtest $(ZSTREAM_TESTTIME) $(FUZZER_FLAGS)
$(QEMU_SYS) ./zstreamtest --mt -t1 $(ZSTREAM_TESTTIME) $(FUZZER_FLAGS)
$(QEMU_SYS) ./zstreamtest --newapi -t1 $(ZSTREAM_TESTTIME) $(FUZZER_FLAGS)
$(QEMU_SYS) ./zstreamtest --opaqueapi -t1 $(ZSTREAM_TESTTIME) $(FUZZER_FLAGS)
echo -n "XXX"; date; $(QEMU_SYS) ./zstreamtest $(ZSTREAM_TESTTIME) $(FUZZER_FLAGS)
echo -n "XXX"; date; $(QEMU_SYS) ./zstreamtest --mt -t1 $(ZSTREAM_TESTTIME) $(FUZZER_FLAGS)
echo -n "XXX"; date; $(QEMU_SYS) ./zstreamtest --newapi -t1 $(ZSTREAM_TESTTIME) $(FUZZER_FLAGS)
echo -n "XXX"; date; $(QEMU_SYS) ./zstreamtest --opaqueapi -t1 $(ZSTREAM_TESTTIME) $(FUZZER_FLAGS)

test-zstream32: zstreamtest32
$(QEMU_SYS) ./zstreamtest32 $(ZSTREAM_TESTTIME) $(FUZZER_FLAGS)
echo -n "XXX"; date; $(QEMU_SYS) ./zstreamtest32 $(ZSTREAM_TESTTIME) $(FUZZER_FLAGS)

test-longmatch: longmatch
$(QEMU_SYS) ./longmatch

test-invalidDictionaries: invalidDictionaries
$(QEMU_SYS) ./invalidDictionaries
echo -n "XXX"; date; $(QEMU_SYS) ./invalidDictionaries

test-symbols: symbols
$(QEMU_SYS) ./symbols
echo -n "XXX"; date; $(QEMU_SYS) ./symbols

test-legacy: legacy
$(QEMU_SYS) ./legacy
echo -n "XXX"; date; $(QEMU_SYS) ./legacy

test-decodecorpus: decodecorpus
$(QEMU_SYS) ./decodecorpus -t $(DECODECORPUS_TESTTIME)
echo -n "XXX"; date; $(QEMU_SYS) ./decodecorpus -t $(DECODECORPUS_TESTTIME)

test-decodecorpus-cli: decodecorpus
@echo "\n ---- decodecorpus basic cli tests ----"
Expand Down Expand Up @@ -372,7 +372,7 @@ test-decodecorpus-cli: decodecorpus
@rm -rf testdir

test-pool: poolTests
$(QEMU_SYS) ./poolTests
echo -n "XXX"; date; $(QEMU_SYS) ./poolTests

test-lz4: ZSTD = LD_LIBRARY_PATH=/usr/local/lib $(PRGDIR)/zstd
test-lz4: ZSTD_LZ4 = LD_LIBRARY_PATH=/usr/local/lib ./lz4
Expand Down
16 changes: 16 additions & 0 deletions tests/playTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ die() {
exit 1
}

display_time()
{
echo -n "XXX"
date
}

roundTripTest() {
if [ -n "$3" ]; then
cLevel="$3"
Expand Down Expand Up @@ -91,6 +97,7 @@ else
hasMT="true"
fi

display_time
$ECHO "\n**** simple tests **** "

./datagen > tmp
Expand Down Expand Up @@ -166,6 +173,7 @@ $ZSTD -f tmp && die "tmp not present : should have failed"
test ! -f tmp.zst # tmp.zst should not be created


display_time
$ECHO "\n**** Advanced compression parameters **** "
$ECHO "Hello world!" | $ZSTD --zstd=windowLog=21, - -o tmp.zst && die "wrong parameters not detected!"
$ECHO "Hello world!" | $ZSTD --zstd=windowLo=21 - -o tmp.zst && die "wrong parameters not detected!"
Expand Down Expand Up @@ -233,6 +241,7 @@ rm -f hello.tmp world.tmp hello.tmp.zst world.tmp.zst
fi


display_time
$ECHO "\n**** test sparse file support **** "

./datagen -g5M -P100 > tmpSparse
Expand Down Expand Up @@ -339,6 +348,7 @@ $ZSTD --train-legacy -q tmp && die "Dictionary training should fail : source is
rm tmp*


display_time
$ECHO "\n**** cover dictionary tests **** "

TESTFILE=../programs/zstdcli.c
Expand Down Expand Up @@ -411,6 +421,7 @@ $ZSTD -t -r files
$ZSTD -c -r files | $ZSTD -t


display_time
$ECHO "\n**** benchmark mode tests **** "

$ECHO "bench one file"
Expand Down Expand Up @@ -505,6 +516,7 @@ else
fi


display_time
$ECHO "\n**** xz frame tests **** "

if [ $LZMAMODE -eq 1 ]; then
Expand Down Expand Up @@ -569,6 +581,7 @@ roundTripTest -g516K 19 # btopt

fileRoundTripTest -g500K

display_time
$ECHO "\n**** zstd long distance matching round-trip tests **** "
roundTripTest -g0 "2 --long"
roundTripTest -g1000K "1 --long"
Expand Down Expand Up @@ -639,6 +652,7 @@ $ZSTD -lv tmp1.zst
rm tmp*


display_time
$ECHO "\n**** zstd long distance matching tests **** "
roundTripTest -g0 " --long"
roundTripTest -g9M "2 --long"
Expand All @@ -654,6 +668,7 @@ if [ "$1" != "--test-large-data" ]; then
exit 0
fi

display_time
$ECHO "\n**** large files tests **** "

roundTripTest -g270000000 1
Expand Down Expand Up @@ -695,6 +710,7 @@ roundTripTest -g700M -P50 "1 --long=29"
roundTripTest -g600M -P50 "1 --long --zstd=wlog=29,clog=28"


display_time
if [ -n "$hasMT" ]
then
$ECHO "\n**** zstdmt long round-trip tests **** "
Expand Down

0 comments on commit 2d1b4c0

Please sign in to comment.