From: Przemyslaw Skibinski Date: Mon, 27 Feb 2017 21:01:03 +0000 (+0100) Subject: use "./gzip" for gzip tests X-Git-Tag: v1.1.4~1^2~38^2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F571%2Fhead;p=thirdparty%2Fzstd.git use "./gzip" for gzip tests --- diff --git a/tests/gzip/Makefile b/tests/gzip/Makefile index f87682c7f..ee993934a 100644 --- a/tests/gzip/Makefile +++ b/tests/gzip/Makefile @@ -9,7 +9,7 @@ PRGDIR = ../../programs VOID = /dev/null - +export PATH := .:$(PATH) .PHONY: all all: test-gzip-env test-helin-segv test-hufts test-keep test-list test-memcpy-abuse test-mixed test-null-suffix-clobber test-stdin test-trailing-nul test-unpack-invalid test-zdiff test-zgrep-context test-zgrep-f test-zgrep-signal test-znew-k test-z-suffix @@ -18,8 +18,8 @@ all: test-gzip-env test-helin-segv test-hufts test-keep test-list test-memcpy-ab .PHONY: zstd zstd: $(MAKE) -C $(PRGDIR) zstd - #alias gzip='$(PRGDIR)/zstd --format=gzip' - #ln -sf /drive_d/GitHub/zstd/programs/zstd /usr/local/bin/gzip + ln -sf $(PRGDIR)/zstd gzip + @echo PATH=$(PATH) gzip --version .PHONY: clean @@ -33,9 +33,9 @@ clean: # validated only for Linux, OSX, Hurd and some BSD targets #------------------------------------------------------------------------------ ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU FreeBSD DragonFly NetBSD)) -#.PHONY: test-gzip-env test-helin-segv test-hufts test-keep test-list test-memcpy-abuse test-mixed test-null-suffix-clobber test-stdin test-trailing-nul test-unpack-invalid test-zdiff test-zgrep-context test-zgrep-f test-zgrep-signal test-znew-k test-z-suffix test-%: zstd - @./test-driver.sh --test-name $* --log-file $*.log --trs-file $*.trs --expect-failure "no" --color-tests "yes" --enable-hard-errors "yes" ./$*.sh + @./test-driver.sh --test-name $* --log-file $*.log --trs-file $*.trs --expect-failure "no" --color-tests "yes" --enable-hard-errors "yes" ./$*.sh + # || echo ignoring error endif diff --git a/tests/gzip/gzip-env.sh b/tests/gzip/gzip-env.sh index 873d716dc..f15a8d476 100755 --- a/tests/gzip/gzip-env.sh +++ b/tests/gzip/gzip-env.sh @@ -17,7 +17,13 @@ # along with this program. If not, see . # limit so don't run it by default. -. "${srcdir=.}/init.sh"; path_prepend_ .. +echo XXX=$PATH +gzip --version + +. "${srcdir=.}/init.sh"; path_prepend_ . + +echo XXX=$PATH +gzip --version echo a >exp || framework_failure_ gzip in || framework_failure_ diff --git a/tests/gzip/helin-segv.sh b/tests/gzip/helin-segv.sh index 0182db33d..f182c8066 100644 --- a/tests/gzip/helin-segv.sh +++ b/tests/gzip/helin-segv.sh @@ -17,7 +17,7 @@ # along with this program. If not, see . # limit so don't run it by default. -. "${srcdir=.}/init.sh"; path_prepend_ .. +. "${srcdir=.}/init.sh"; path_prepend_ . # This test case was provided by Aki Helin. printf '\037\235\220\0\0\0\304' > helin.gz || framework_failure_ diff --git a/tests/gzip/help-version.sh b/tests/gzip/help-version.sh index 5af9a0509..ee0c19f7d 100644 --- a/tests/gzip/help-version.sh +++ b/tests/gzip/help-version.sh @@ -23,7 +23,7 @@ test "x$SHELL" = x && SHELL=/bin/sh export SHELL -. "${srcdir=.}/init.sh"; path_prepend_ .. +. "${srcdir=.}/init.sh"; path_prepend_ . expected_failure_status_chroot=125 expected_failure_status_env=125 diff --git a/tests/gzip/hufts.sh b/tests/gzip/hufts.sh index 5832a2184..9b9576ce3 100644 --- a/tests/gzip/hufts.sh +++ b/tests/gzip/hufts.sh @@ -17,7 +17,7 @@ # along with this program. If not, see . # limit so don't run it by default. -. "${srcdir=.}/init.sh"; path_prepend_ .. +. "${srcdir=.}/init.sh"; path_prepend_ . printf '\n...: invalid compressed data--format violated\n' > exp \ || framework_failure_ diff --git a/tests/gzip/keep.sh b/tests/gzip/keep.sh index 105d43e64..ab9a21811 100644 --- a/tests/gzip/keep.sh +++ b/tests/gzip/keep.sh @@ -17,7 +17,7 @@ # along with this program. If not, see . # limit so don't run it by default. -. "${srcdir=.}/init.sh"; path_prepend_ .. +. "${srcdir=.}/init.sh"; path_prepend_ . echo fooooooooo > in || framework_failure_ cp in orig || framework_failure_ diff --git a/tests/gzip/list.sh b/tests/gzip/list.sh index 7576dc3a8..75912e1e2 100644 --- a/tests/gzip/list.sh +++ b/tests/gzip/list.sh @@ -17,7 +17,7 @@ # along with this program. If not, see . # limit so don't run it by default. -. "${srcdir=.}/init.sh"; path_prepend_ .. +. "${srcdir=.}/init.sh"; path_prepend_ . echo zoology zucchini > in || framework_failure_ cp in orig || framework_failure_ diff --git a/tests/gzip/memcpy-abuse.sh b/tests/gzip/memcpy-abuse.sh index 970b88523..7d5c056de 100644 --- a/tests/gzip/memcpy-abuse.sh +++ b/tests/gzip/memcpy-abuse.sh @@ -18,7 +18,7 @@ # along with this program. If not, see . # limit so don't run it by default. -. "${srcdir=.}/init.sh"; path_prepend_ .. +. "${srcdir=.}/init.sh"; path_prepend_ . # The input must be larger than 32KiB and slightly # less uniform than e.g., all zeros. diff --git a/tests/gzip/mixed.sh b/tests/gzip/mixed.sh index 50e2537a2..383a54f5e 100644 --- a/tests/gzip/mixed.sh +++ b/tests/gzip/mixed.sh @@ -18,7 +18,7 @@ # along with this program. If not, see . # limit so don't run it by default. -. "${srcdir=.}/init.sh"; path_prepend_ .. +. "${srcdir=.}/init.sh"; path_prepend_ . printf 'xxx\nyyy\n' > exp2 || framework_failure_ printf 'aaa\nbbb\nccc\n' > exp3 || framework_failure_ diff --git a/tests/gzip/null-suffix-clobber.sh b/tests/gzip/null-suffix-clobber.sh index 903864ce6..0efd0e344 100644 --- a/tests/gzip/null-suffix-clobber.sh +++ b/tests/gzip/null-suffix-clobber.sh @@ -17,7 +17,7 @@ # along with this program. If not, see . # limit so don't run it by default. -. "${srcdir=.}/init.sh"; path_prepend_ .. +. "${srcdir=.}/init.sh"; path_prepend_ . printf anything | gzip > F.gz || framework_failure_ echo y > yes || framework_failure_ diff --git a/tests/gzip/stdin.sh b/tests/gzip/stdin.sh index 190687f96..eef4cd8b1 100644 --- a/tests/gzip/stdin.sh +++ b/tests/gzip/stdin.sh @@ -17,7 +17,7 @@ # along with this program. If not, see . # limit so don't run it by default. -. "${srcdir=.}/init.sh"; path_prepend_ .. +. "${srcdir=.}/init.sh"; path_prepend_ . printf a | gzip > in || framework_failure_ printf aaa > exp || framework_failure_ diff --git a/tests/gzip/trailing-nul.sh b/tests/gzip/trailing-nul.sh index b21f76fdc..7b15d5e55 100644 --- a/tests/gzip/trailing-nul.sh +++ b/tests/gzip/trailing-nul.sh @@ -18,7 +18,7 @@ # along with this program. If not, see . # limit so don't run it by default. -. "${srcdir=.}/init.sh"; path_prepend_ .. +. "${srcdir=.}/init.sh"; path_prepend_ . (echo 0 | gzip; printf '\0') > 0.gz || framework_failure_ (echo 00 | gzip; printf '\0\0') > 00.gz || framework_failure_ diff --git a/tests/gzip/unpack-invalid.sh b/tests/gzip/unpack-invalid.sh index acea97e83..fe8384d73 100644 --- a/tests/gzip/unpack-invalid.sh +++ b/tests/gzip/unpack-invalid.sh @@ -18,7 +18,7 @@ # along with this program. If not, see . # limit so don't run it by default. -. "${srcdir=.}/init.sh"; path_prepend_ .. +. "${srcdir=.}/init.sh"; path_prepend_ . for input in \ '\037\036\000\000\037\213\010\000\000\000\000\000\002\003\036\000\000\000\002\003\037\213\010\000\000\000\000\000\002\003\355\301\001\015\000\000\000\302\240\037\000\302\240\037\213\010\000\000\000\000\000\002\003\355\301' \ diff --git a/tests/gzip/z-suffix.sh b/tests/gzip/z-suffix.sh index 470932060..a870a5408 100644 --- a/tests/gzip/z-suffix.sh +++ b/tests/gzip/z-suffix.sh @@ -17,7 +17,7 @@ # along with this program. If not, see . # limit so don't run it by default. -. "${srcdir=.}/init.sh"; path_prepend_ .. +. "${srcdir=.}/init.sh"; path_prepend_ . printf anything > F && cp F G || framework_failure_ gzip -Sz F || fail=1 diff --git a/tests/gzip/zdiff.sh b/tests/gzip/zdiff.sh index 0bb7c7dfd..d62a84606 100644 --- a/tests/gzip/zdiff.sh +++ b/tests/gzip/zdiff.sh @@ -18,7 +18,7 @@ # along with this program. If not, see . # limit so don't run it by default. -. "${srcdir=.}/init.sh"; path_prepend_ .. +. "${srcdir=.}/init.sh"; path_prepend_ . echo a > a || framework_failure_ echo b > b || framework_failure_ diff --git a/tests/gzip/zgrep-context.sh b/tests/gzip/zgrep-context.sh index 089d25639..c8648b7e4 100644 --- a/tests/gzip/zgrep-context.sh +++ b/tests/gzip/zgrep-context.sh @@ -17,7 +17,7 @@ # along with this program. If not, see . # limit so don't run it by default. -. "${srcdir=.}/init.sh"; path_prepend_ .. +. "${srcdir=.}/init.sh"; path_prepend_ . # A limited replacement for seq: handle 1 or 2 args; increment must be 1 seq() diff --git a/tests/gzip/zgrep-f.sh b/tests/gzip/zgrep-f.sh index 1ce8cc293..d0cf27f7e 100644 --- a/tests/gzip/zgrep-f.sh +++ b/tests/gzip/zgrep-f.sh @@ -18,7 +18,7 @@ # along with this program. If not, see . # limit so don't run it by default. -. "${srcdir=.}/init.sh"; path_prepend_ .. +. "${srcdir=.}/init.sh"; path_prepend_ . printf 'needle\nn2\n' > n || framework_failure_ cp n haystack || framework_failure_ diff --git a/tests/gzip/zgrep-signal.sh b/tests/gzip/zgrep-signal.sh index 13783ef10..a8c53881a 100644 --- a/tests/gzip/zgrep-signal.sh +++ b/tests/gzip/zgrep-signal.sh @@ -18,7 +18,7 @@ # along with this program. If not, see . # limit so don't run it by default. -. "${srcdir=.}/init.sh"; path_prepend_ .. +. "${srcdir=.}/init.sh"; path_prepend_ . echo a | gzip -c > f.gz || framework_failure_ diff --git a/tests/gzip/znew-k.sh b/tests/gzip/znew-k.sh index 98e7fa1f8..6c239e28e 100644 --- a/tests/gzip/znew-k.sh +++ b/tests/gzip/znew-k.sh @@ -17,7 +17,7 @@ # along with this program. If not, see . # limit so don't run it by default. -. "${srcdir=.}/init.sh"; path_prepend_ .. +. "${srcdir=.}/init.sh"; path_prepend_ . cat <<'EOF' >compress || framework_failure_ #!/bin/sh