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