1# ################################################################ 2# Copyright (c) 2017-present, Facebook, Inc. 3# All rights reserved. 4# 5# This source code is licensed under both the BSD-style license (found in the 6# LICENSE file in the root directory of this source tree) and the GPLv2 (found 7# in the COPYING file in the root directory of this source tree). 8# ################################################################ 9 10PRGDIR = ../../programs 11VOID = /dev/null 12export PATH := .:$(PATH) 13 14.PHONY: all 15#all: test-gzip-env 16all: test-helin-segv test-hufts test-keep test-list test-memcpy-abuse test-mixed 17all: test-null-suffix-clobber test-stdin test-trailing-nul test-unpack-invalid 18all: test-zdiff test-zgrep-context test-zgrep-f test-zgrep-signal test-znew-k test-z-suffix 19 @echo Testing completed 20 21.PHONY: zstd 22zstd: 23 $(MAKE) -C $(PRGDIR) zstd 24 ln -sf $(PRGDIR)/zstd gzip 25 @echo PATH=$(PATH) 26 gzip --version 27 28.PHONY: clean 29clean: 30 @$(MAKE) -C $(PRGDIR) $@ > $(VOID) 31 @$(RM) *.trs *.log 32 @echo Cleaning completed 33 34 35#------------------------------------------------------------------------------ 36# validated only for Linux, macOS, Hurd and some BSD targets 37#------------------------------------------------------------------------------ 38ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU FreeBSD DragonFly NetBSD)) 39 40test-%: zstd 41 @./test-driver.sh --test-name $* --log-file $*.log --trs-file $*.trs --expect-failure "no" --color-tests "yes" --enable-hard-errors "yes" ./$*.sh 42 # || echo ignoring error 43 44endif 45