Lines Matching +full:- +full:- +full:without +full:- +full:zstd
6 # This source code is licensed under both the BSD-style license (found in the
9 # You may select, at your option, one of the above-listed licenses.
12 # fullbench : Precisely measure speed for each zstd inner functions
13 # fullbench32: Same as fullbench, but forced to compile in 32-bits mode
14 # fuzzer : Test tool, to check zstd integrity on target platform
15 # fuzzer32: Same as fuzzer, but forced to compile in 32-bits mode
16 # paramgrill : parameter tester for zstd
17 # test-zstd-speed.py : script for testing zstd speed difference between commits
18 # versionsTest : compatibility test between zstd versions stored on Github (v0.1+)
19 # zstreamtest : Fuzzer test tool for zstd streaming API
20 # zstreamtest32: Same as zstreamtest, but forced to compile in 32-bits mode
27 export DEBUGLEVEL # transmit value to sub-makefiles
36 DEBUGFLAGS += -g -Wno-c++-compat
37 CPPFLAGS += -I$(LIB_SRCDIR) -I$(LIB_SRCDIR)/common -I$(LIB_SRCDIR)/compress -I$(LIB_SRCDIR)/legac…
38 -I$(LIB_SRCDIR)/dictBuilder -I$(LIB_SRCDIR)/deprecated -I$(PRGDIR) \
39 -DZSTD_WINDOW_OVERFLOW_CORRECT_FREQUENTLY=1
66 MULTITHREAD_CPP = -DZSTD_MULTITHREAD
70 MULTITHREAD_CPP = -DZSTD_MULTITHREAD
71 MULTITHREAD_LD = -pthread
76 ZSTREAM_TESTTIME ?= -T90s
77 FUZZERTEST ?= -T200s
78 ZSTDRTTEST = --test-large-data
79 DECODECORPUS_TESTTIME ?= -T30
97 dll: fuzzer-dll zstreamtest-dll
99 .PHONY: zstd zstd32 zstd-nolegacy # only external makefile knows how to build or update them
100 zstd zstd32 zstd-nolegacy zstd-dll: target
101 $(MAKE) -C $(PRGDIR) $@ MOREFLAGS+="$(DEBUGFLAGS)"
105 $(MAKE) -C $(LIB_SRCDIR) libzstd MOREFLAGS+="$(DEBUGFLAGS)"
107 %-dll : libzstd
108 %-dll : LDFLAGS += -L$(LIB_BINDIR) -lzstd
111 $(MAKE) -C $(LIB_SRCDIR) libzstd.a
114 $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
117 $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
120 $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
123 $(CC) -c $(CPPFLAGS) $(ASFLAGS) $< -o $@
126 $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
131 $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
134 $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
137 $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
140 $(CC) -c $(CPPFLAGS) $(ASFLAGS) $< -o $@
143 $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
147 fullbench32: CPPFLAGS += -m32
148 $(FULLBENCHS) : CPPFLAGS += $(MULTITHREAD_CPP) -Wno-deprecated-declarations
150 $(FULLBENCHS) : DEBUGFLAGS = -DNDEBUG # turn off assert() for speed measurements
153 $(LINK.c) $^ -o $@$(EXT)
155 CLEAN += fullbench-lib
156 fullbench-lib : CPPFLAGS += -DXXH_NAMESPACE=ZSTD_
157 fullbench-lib : $(PRGDIR)/datagen.c $(PRGDIR)/util.c $(PRGDIR)/timefn.c $(PRGDIR)/benchfn.c $(LIB_S…
158 $(LINK.c) $^ -o $@$(EXT)
161 fullbench-dll: $(PRGDIR)/datagen.c $(PRGDIR)/util.c $(PRGDIR)/benchfn.c $(PRGDIR)/timefn.c fullbenc…
162 # $(CC) $(FLAGS) $(filter %.c,$^) -o $@$(EXT) -DZSTD_DLL_IMPORT=1 $(LIB_SRCDIR)/dll/libzstd.dll
163 $(LINK.c) $^ $(LDLIBS) -o $@$(EXT)
166 fuzzer : CPPFLAGS += $(MULTITHREAD_CPP) -Wno-deprecated-declarations
171 fuzzer32 : CFLAGS += -m32 $(MULTITHREAD)
173 $(LINK.c) $^ -o $@$(EXT)
176 fuzzer-dll : $(LIB_SRCDIR)/common/xxhash.c $(PRGDIR)/util.c $(PRGDIR)/timefn.c $(PRGDIR)/datagen.c …
177 $(CC) $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) $(LDFLAGS) -o $@$(EXT)
183 zstreamtest32 : CFLAGS += -m32
189 $(LINK.c) $^ -o $@$(EXT)
192 zstreamtest_asan : CFLAGS += -fsanitize=address
194 $(LINK.c) $(MULTITHREAD) $^ -o $@$(EXT)
197 zstreamtest_tsan : CFLAGS += -fsanitize=thread
199 $(LINK.c) $(MULTITHREAD) $^ -o $@$(EXT)
202 zstreamtest_ubsan : CFLAGS += -fsanitize=undefined
204 $(LINK.c) $(MULTITHREAD) $^ -o $@$(EXT)
207 zstreamtest-dll : $(LIB_SRCDIR)/common/xxhash.c # xxh symbols not exposed from dll
208 zstreamtest-dll : $(ZSTREAM_LOCAL_FILES)
209 $(CC) $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) $(LDFLAGS) -o $@$(EXT)
213 paramgrill : LDLIBS += -lm
218 $(LINK.c) $^ -o $@$(EXT)
235 legacy : CPPFLAGS += -UZSTD_LEGACY_SUPPORT -DZSTD_LEGACY_SUPPORT=4
239 decodecorpus : LDLIBS += -lm
240 decodecorpus : $(filter-out zstdc_zstd_compress.o, $(ZSTD_OBJECTS)) $(ZDICT_FILES) $(PRGDIR)/util.c…
244 $(LINK.c) $(MULTITHREAD) $^ -o $@$(EXT)
248 $(PYTHON) test-zstd-versions.py
256 checkTag.o : $(LIB_SRCDIR)/zstd.h
260 $(MAKE) -C $(LIB_SRCDIR) clean
261 $(MAKE) -C $(PRGDIR) clean
262 $(MAKE) -C fuzz clean
263 $(RM) -R $(TESTARTEFACT)
264 $(RM) -r tmp* # some test directories are named tmp*
266 $(PRGDIR)/zstd$(EXT) $(PRGDIR)/zstd32$(EXT) \
267 fullbench-dll$(EXT) fuzzer-dll$(EXT) zstreamtest-dll$(EXT)
271 #----------------------------------------------------------------------------------
273 #----------------------------------------------------------------------------------
278 .PHONY: test-valgrind
279 test-valgrind: VALGRIND = valgrind --leak-check=full --show-leak-kinds=all --error-exitcode=1
280 test-valgrind: zstd datagen fuzzer fullbench
281 @echo "\n ---- valgrind tests : memory analyzer ----"
282 $(VALGRIND) ./datagen -g50M > $(VOID)
283 …$(VALGRIND) $(PRGDIR)/zstd ; if [ $$? -eq 0 ] ; then echo "zstd without argument should have faile…
284 ./datagen -g80 | $(VALGRIND) $(PRGDIR)/zstd - -c > $(VOID)
285 ./datagen -g16KB | $(VALGRIND) $(PRGDIR)/zstd -vf - -c > $(VOID)
286 ./datagen -g2930KB | $(VALGRIND) $(PRGDIR)/zstd -5 -vf - -o tmp
287 $(VALGRIND) $(PRGDIR)/zstd -vdf tmp -c > $(VOID)
288 ./datagen -g64MB | $(VALGRIND) $(PRGDIR)/zstd -vf - -c > $(VOID)
290 $(VALGRIND) ./fuzzer -T1mn -t1
291 $(VALGRIND) ./fullbench -i1
300 #-----------------------------------------------------------------------------
302 #-----------------------------------------------------------------------------
312 …-pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make …
316 shortest: test-zstd
322 fuzztest: test-fuzzer test-zstream test-decodecorpus
325 test: test-zstd test-cli-tests test-fullbench test-fuzzer test-zstream test-invalidDictionaries tes…
327 test: test-pool
331 test32: test-zstd32 test-fullbench32 test-fuzzer32 test-zstream32
333 .PHONY: test-all
334 test-all: test test32 test-decodecorpus-cli
336 .PHONY: test-zstd test-zstd32 test-zstd-nolegacy
337 test-zstd: ZSTD = $(PRGDIR)/zstd macro
338 test-zstd: zstd
340 .PHONY: test-zstd-dll
341 test-zstd-dll: ZSTD = $(PRGDIR)/zstd macro
342 test-zstd-dll: zstd-dll
344 test-zstd32: ZSTD = $(PRGDIR)/zstd32 macro
345 test-zstd32: zstd32
347 test-zstd-nolegacy: ZSTD = $(PRGDIR)/zstd-nolegacy macro
348 test-zstd-nolegacy: zstd-nolegacy
350 test-zstd test-zstd32 test-zstd-nolegacy test-zstd-dll: datagen
351 file $(ZSTD)
352 EXE_PREFIX="$(QEMU_SYS)" ZSTD_BIN="$(ZSTD)" DATAGEN_BIN=./datagen ./playTests.sh $(ZSTDRTTEST)
354 .PHONY: test-cli-tests
355 test-cli-tests: ZSTD = $(PRGDIR)/zstd macro
356 test-cli-tests: zstd datagen
357 file $(ZSTD)
358 ./cli-tests/run.py --exec-prefix="$(QEMU_SYS)" --zstd="$(ZSTD)" --datagen=./datagen
360 .PHONY: test-fullbench
361 test-fullbench: fullbench datagen
362 $(QEMU_SYS) ./fullbench -i1
363 $(QEMU_SYS) ./fullbench -i1 -P0
365 .PHONY: test-fullbench32
366 test-fullbench32: fullbench32 datagen
367 $(QEMU_SYS) ./fullbench32 -i1
368 $(QEMU_SYS) ./fullbench32 -i1 -P0
370 .PHONY: test-fuzzer
371 test-fuzzer: fuzzer
372 $(QEMU_SYS) ./fuzzer -v $(FUZZERTEST) $(FUZZER_FLAGS)
375 .PHONY: test-fuzzer-stackmode
376 test-fuzzer-stackmode: MOREFLAGS += -DZSTD_HEAPMODE=0
377 test-fuzzer-stackmode: test-fuzzer
379 .PHONY: test-fuzzer32
380 test-fuzzer32: fuzzer32
381 $(QEMU_SYS) ./fuzzer32 -v $(FUZZERTEST) $(FUZZER_FLAGS)
383 .PHONY: test-zstream
384 test-zstream: zstreamtest
385 $(QEMU_SYS) ./zstreamtest -v $(ZSTREAM_TESTTIME) $(FUZZER_FLAGS)
386 $(QEMU_SYS) ./zstreamtest --newapi -t1 $(ZSTREAM_TESTTIME) $(FUZZER_FLAGS)
388 test-zstream32: zstreamtest32
389 $(QEMU_SYS) ./zstreamtest32 -v $(ZSTREAM_TESTTIME) $(FUZZER_FLAGS)
391 test-longmatch: longmatch
394 test-bigdict: bigdict
397 test-invalidDictionaries: invalidDictionaries
400 test-legacy: legacy
403 test-decodecorpus: decodecorpus
404 $(QEMU_SYS) ./decodecorpus -t $(DECODECORPUS_TESTTIME)
406 test-decodecorpus-cli: decodecorpus
407 @echo "\n ---- decodecorpus basic cli tests ----"
409 ./decodecorpus -n5 -otestdir -ptestdir
411 $(ZSTD) -d z000000.zst -o tmp0 && \
412 $(ZSTD) -d z000001.zst -o tmp1 && \
413 $(ZSTD) -d z000002.zst -o tmp2 && \
414 $(ZSTD) -d z000003.zst -o tmp3 && \
415 $(ZSTD) -d z000004.zst -o tmp4 && \
423 @echo "\n ---- decodecorpus dictionary cli tests ----"
424 ./decodecorpus -n5 -otestdir -ptestdir --use-dict=1MB
426 $(ZSTD) -d z000000.zst -D dictionary -o tmp0 && \
427 $(ZSTD) -d z000001.zst -D dictionary -o tmp1 && \
428 $(ZSTD) -d z000002.zst -D dictionary -o tmp2 && \
429 $(ZSTD) -d z000003.zst -D dictionary -o tmp3 && \
430 $(ZSTD) -d z000004.zst -D dictionary -o tmp4 && \
437 @rm -rf testdir
439 test-pool: poolTests
442 test-lz4: ZSTD = LD_LIBRARY_PATH=/usr/local/lib $(PRGDIR)/zstd macro
443 test-lz4: ZSTD_LZ4 = LD_LIBRARY_PATH=/usr/local/lib ./lz4
444 test-lz4: ZSTD_UNLZ4 = LD_LIBRARY_PATH=/usr/local/lib ./unlz4
445 test-lz4: zstd decodecorpus datagen
446 [ -f lz4 ] || ln -s $(PRGDIR)/zstd lz4
447 [ -f unlz4 ] || ln -s $(PRGDIR)/zstd unlz4
449 ./decodecorpus -ptmp
450 # lz4 -> zstd
452 $(ZSTD) -d | \
453 cmp - tmp
456 cmp - tmp
457 # zstd -> lz4
458 $(ZSTD) --format=lz4 < tmp | \
459 lz4 -d | \
460 cmp - tmp
462 lz4 -d | \
463 cmp - tmp
464 # zstd -> zstd
465 $(ZSTD) --format=lz4 < tmp | \
466 $(ZSTD) -d | \
467 cmp - tmp
468 # zstd -> zstd
469 $(ZSTD) < tmp | \
470 $(ZSTD) -d | \
471 cmp - tmp
473 ./datagen -g384KB | $(ZSTD) --format=lz4 | $(ZSTD) -d > /dev/null