Lines Matching +full:tests +full:- +full:fedora +full:- +full:clang
2 # Copyright (c) 2015-2020, Yann Collet, Facebook, Inc.
5 # This source code is licensed under both the BSD-style license (found in the
8 # You may select, at your option, one of the above-listed licenses.
18 TESTDIR = tests
24 # When cross-compiling from linux to windows, you might
25 # need to specify this as "Windows." Fedora build fails
28 # Note: mingw-w64 build from linux to windows does not
39 ## default: Build lib-release and zstd-release
41 default: lib-release zstd-release
51 allzstd: lib-all
52 $(Q)$(MAKE) -C $(PRGDIR) all
53 $(Q)$(MAKE) -C $(TESTDIR) all
57 $(MAKE) -C $(PRGDIR) zstd32
58 $(MAKE) -C $(TESTDIR) all32
60 .PHONY: lib lib-release libzstd.a
61 lib-all : lib
62 lib lib-release lib-all :
63 $(Q)$(MAKE) -C $(ZSTDDIR) $@
65 .PHONY: zstd zstd-release
66 zstd zstd-release:
67 $(Q)$(MAKE) -C $(PRGDIR) $@
68 $(Q)ln -sf $(PRGDIR)/zstd$(EXT) zstd$(EXT)
72 $(Q)$(MAKE) -C $(PRGDIR) $@
77 $(MAKE) -C $(ZWRAPDIR) all
79 ## test: run long-duration tests
82 test: MOREFLAGS += -g -Werror
84 DEBUGLEVEL=$(DEBUGLEVEL) MOREFLAGS="$(MOREFLAGS)" $(MAKE) -j -C $(PRGDIR) allVariants
85 $(MAKE) -C $(TESTDIR) $@
86 ZSTD=../../programs/zstd $(MAKE) -C doc/educational_decoder $@
91 $(Q)$(MAKE) -C $(TESTDIR) $@
93 ## check: run basic tests for `zstd` cli
99 $(MAKE) -C $(TESTDIR) $@
107 $(MAKE) -C examples all
112 $(MAKE) -C contrib/gen_html $@
117 $(MAKE) -C programs $@
122 $(MAKE) -C contrib/pzstd all
123 $(MAKE) -C contrib/seekable_format/examples all
124 $(MAKE) -C contrib/seekable_format/tests test
125 $(MAKE) -C contrib/largeNbDicts all
135 $(Q)$(MAKE) -C $(ZSTDDIR) $@ > $(VOID)
136 $(Q)$(MAKE) -C $(PRGDIR) $@ > $(VOID)
137 $(Q)$(MAKE) -C $(TESTDIR) $@ > $(VOID)
138 $(Q)$(MAKE) -C $(ZWRAPDIR) $@ > $(VOID)
139 $(Q)$(MAKE) -C examples/ $@ > $(VOID)
140 $(Q)$(MAKE) -C contrib/gen_html $@ > $(VOID)
141 $(Q)$(MAKE) -C contrib/pzstd $@ > $(VOID)
142 $(Q)$(MAKE) -C contrib/seekable_format/examples $@ > $(VOID)
143 $(Q)$(MAKE) -C contrib/seekable_format/tests $@ > $(VOID)
144 $(Q)$(MAKE) -C contrib/largeNbDicts $@ > $(VOID)
146 $(Q)$(RM) -r lz4
149 #------------------------------------------------------------------------------
151 #------------------------------------------------------------------------------
155 …AMS = -DZSTD_BUILD_CONTRIB:BOOL=ON -DZSTD_BUILD_STATIC:BOOL=ON -DZSTD_BUILD_TESTS:BOOL=ON -DZSTD_Z…
157 HAVE_COLORNEVER = $(shell echo a | egrep --color=never a > /dev/null 2> /dev/null && echo 1 || echo…
160 EGREP_OPTIONS += --color=never
170 $(Q)TARGETS=$$($(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null \
171 | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' \
172 | $(EGREP) -v -e '^[^[:alnum:]]' | sort); \
175 printf "%0.s-" {1..16}; printf "\t"; printf "%0.s-" {1..40}; printf "\n"; \
181 } | column -t -s $$'\t'
185 $(Q)$(MAKE) -C $(ZSTDDIR) $@
186 $(Q)$(MAKE) -C $(PRGDIR) $@
190 $(Q)$(MAKE) -C $(ZSTDDIR) $@
191 $(Q)$(MAKE) -C $(PRGDIR) $@
193 .PHONY: travis-install
194 travis-install:
199 gcc-5 -v
200 CC=gcc-5 $(MAKE) all MOREFLAGS="-Werror"
204 gcc-6 -v
205 CC=gcc-6 $(MAKE) all MOREFLAGS="-Werror"
209 gcc-7 -v
210 CC=gcc-7 $(MAKE) all MOREFLAGS="-Werror"
214 clang -v
215 CXX=clang++ CC=clang CFLAGS="-Werror -Wconversion -Wno-sign-conversion -Wdocumentation" $(MAKE) all
218 gcc -v
222 CC=arm-linux-gnueabi-gcc CFLAGS="-Werror" $(MAKE) allzstd
225 CC=aarch64-linux-gnu-gcc CFLAGS="-Werror" $(MAKE) allzstd
228 CC=powerpc-linux-gnu-gcc CFLAGS="-m32 -Wno-attributes -Werror" $(MAKE) allzstd
231 CC=powerpc-linux-gnu-gcc CFLAGS="-m64 -Werror" $(MAKE) allzstd
234 …CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static MOREFLAGS="-static" FUZZER_FLAGS=--no-big-tests …
237 ld -v
238 …CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static MOREFLAGS="-static" FUZZER_FLAGS=--no-big-te…
241 …CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static MOREFLAGS="-static" FUZZER_FLAGS=--no-big-tests …
244 …CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static MOREFLAGS="-m64 -static" FUZZER_FLAGS=--no-big…
247 cxxtest: CXXFLAGS += -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror
249 …$(MAKE) -C $(PRGDIR) all CC="$(CXX) -Wno-deprecated" CFLAGS="$(CXXFLAGS)" # adding -Wno-deprecat…
252 gcc-5 -v
253 $(MAKE) all CC=gcc-5 MOREFLAGS="-Werror"
256 gcc-6 -v
257 $(MAKE) all CC=gcc-6 MOREFLAGS="-Werror"
260 $(MAKE) -C $(TESTDIR) datagen # use native, faster
261 …$(MAKE) -C $(TESTDIR) test CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static ZSTDRTTEST= MOREFLAGS…
264 $(MAKE) -C $(TESTDIR) datagen # use native, faster
265 …MAKE) -C $(TESTDIR) test CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static ZSTDRTTEST= MOREFLA…
268 $(MAKE) -C $(TESTDIR) datagen # use native, faster
269 …-C $(TESTDIR) test CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static ZSTDRTTEST= MOREFLAGS="-Werro…
272 $(MAKE) -C $(TESTDIR) datagen # use native, faster
273 …$(MAKE) -C $(TESTDIR) test CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static ZSTDRTTEST= MOREFLA…
275 arm-ppc-compilation:
276 …$(MAKE) -C $(PRGDIR) clean zstd CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static ZSTDRTTEST= MORE…
277 …$(MAKE) -C $(PRGDIR) clean zstd CC=aarch64-linux-gnu-gcc QEMU_SYS=qemu-aarch64-static ZSTDRTTEST= …
278 …$(MAKE) -C $(PRGDIR) clean zstd CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc-static ZSTDRTTEST= MORE…
279 …$(MAKE) -C $(PRGDIR) clean zstd CC=powerpc-linux-gnu-gcc QEMU_SYS=qemu-ppc64-static ZSTDRTTEST= MO…
282 $(MAKE) -C $(FUZZDIR) regressiontest
285 …$(MAKE) -C $(FUZZDIR) regressiontest CC=clang CXX=clang++ CFLAGS="-O3 -fsanitize=address,undefined…
288 …$(MAKE) -C $(FUZZDIR) regressiontest CC=clang CXX=clang++ CFLAGS="-O3 -fsanitize=memory" CXXFLAGS=…
290 # run UBsan with -fsanitize-recover=signed-integer-overflow
295 …$(MAKE) test CC=clang MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize-recover=signed-integer-ov…
298 $(MAKE) test CC=clang MOREFLAGS="-g -fsanitize=address -Werror"
300 asan-%: clean
301 …LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=address -Werror" $(MAKE) …
304 …$(MAKE) test CC=clang MOREFLAGS="-g -fsanitize=memory -fno-omit-frame-pointer -Werror" HAVE_LZMA=0…
306 msan-%: clean
307 …LAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=memory -fno-omit-frame-point…
310 $(MAKE) -C $(TESTDIR) test32 CC=clang MOREFLAGS="-g -fsanitize=address"
313 …$(MAKE) test CC=clang MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize-recover=signed-integer-ov…
315 uasan-%: clean
316 …AGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize-recover=signed-integer-overfl…
318 tsan-%: clean
319 …LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=thread -Werror" $(MAKE) -…
321 apt-install:
322 sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install $(APT_PACKAGES)
324 apt-add-repo:
325 sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
326 sudo apt-get update -y -qq
329 APT_PACKAGES="qemu-system-ppc qemu-user-static gcc-powerpc-linux-gnu" $(MAKE) apt-install
332 …KAGES="qemu-system-arm qemu-user-static gcc-arm-linux-gnueabi libc6-dev-armel-cross gcc-aarch64-li…
335 APT_PACKAGES="valgrind" $(MAKE) apt-install
338 APT_PACKAGES="libc6-dev-i386 gcc-multilib" $(MAKE) apt-install
340 gcc6install: apt-add-repo
341 APT_PACKAGES="libc6-dev-i386 gcc-multilib gcc-6 gcc-6-multilib" $(MAKE) apt-install
343 gcc7install: apt-add-repo
344 APT_PACKAGES="libc6-dev-i386 gcc-multilib gcc-7 gcc-7-multilib" $(MAKE) apt-install
346 gcc8install: apt-add-repo
347 APT_PACKAGES="libc6-dev-i386 gcc-multilib gcc-8 gcc-8-multilib" $(MAKE) apt-install
349 gpp6install: apt-add-repo
350 APT_PACKAGES="libc6-dev-i386 g++-multilib gcc-6 g++-6 g++-6-multilib" $(MAKE) apt-install
353 APT_PACKAGES="clang-3.8" $(MAKE) apt-install
355 # Ubuntu 14.04 ships a too-old lz4
357 [ -e lz4 ] || git clone https://github.com/lz4/lz4 && sudo $(MAKE) -C lz4 install
364 CMAKE_PARAMS = -G"MSYS Makefiles" -DCMAKE_BUILD_TYPE=Debug -DZSTD_MULTITHREAD_SUPPORT:BOOL=OFF -DZS…
368 #------------------------------------------------------------------------
369 # target specific tests
370 #------------------------------------------------------------------------
373 cmake --version
374 $(RM) -r $(BUILDIR)/cmake/build
376 cd $(BUILDIR)/cmake/build; cmake -DCMAKE_INSTALL_PREFIX:PATH=~/install_test_dir $(CMAKE_PARAMS) ..
377 $(MAKE) -C $(BUILDIR)/cmake/build -j4;
378 $(MAKE) -C $(BUILDIR)/cmake/build install;
379 $(MAKE) -C $(BUILDIR)/cmake/build uninstall;
380 cd $(BUILDIR)/cmake/build; ctest -V -L Medium
383 $(CC) -v
384 CFLAGS="-std=c89 -Werror" $(MAKE) allmost # will fail, due to missing support for `long long`
387 $(CC) -v
388 CFLAGS="-std=gnu90 -Werror" $(MAKE) allmost
391 $(CC) -v
392 CFLAGS="-std=c99 -Werror" $(MAKE) allmost
395 $(CC) -v
396 CFLAGS="-std=gnu99 -Werror" $(MAKE) allmost
399 $(CC) -v
400 CFLAGS="-std=c11 -Werror" $(MAKE) allmost
403 $(CC) -v
404 CFLAGS="-O3 -mbmi -Werror" $(MAKE) -C $(TESTDIR) test
407 $(CC) -v
408 CFLAGS="-O3 -mbmi -mx32 -Werror" $(MAKE) -C $(TESTDIR) test
411 $(CC) -v
412 CFLAGS="-O3 -mbmi -m32 -Werror" $(MAKE) -C $(TESTDIR) test
414 # static analyzer test uses clang's scan-build
416 staticAnalyze: SCANBUILD ?= scan-build
418 $(CC) -v
419 CC=$(CC) CPPFLAGS=-g $(SCANBUILD) --status-bugs -v $(MAKE) allzstd examples contrib