tests: fix "make check" failure on AIX 7.1
[debian/gzip] / tests / Makefile.am
1 ## Process this file with automake to create Makefile.in
2 # Copyright 2010-2016 Free Software Foundation, Inc.
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3, or (at your option)
7 # any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17 TESTS =                                 \
18   gzip-env                              \
19   helin-segv                            \
20   help-version                          \
21   hufts                                 \
22   keep                                  \
23   memcpy-abuse                          \
24   mixed                                 \
25   null-suffix-clobber                   \
26   stdin                                 \
27   trailing-nul                          \
28   unpack-invalid                        \
29   z-suffix                              \
30   zdiff                                 \
31   zgrep-f                               \
32   zgrep-context                         \
33   zgrep-signal                          \
34   znew-k
35
36 EXTRA_DIST =                            \
37   $(TESTS)                              \
38   init.cfg                              \
39   init.sh                               \
40   hufts-segv.gz
41
42 built_programs = \
43   gzip          \
44   gunzip        \
45   gzexe         \
46   zcat          \
47   zcmp          \
48   zdiff         \
49   zegrep        \
50   zfgrep        \
51   zforce        \
52   zgrep         \
53   zless         \
54   zmore         \
55   znew
56
57 TESTS_ENVIRONMENT =                                     \
58   tmp__=$$TMPDIR; test -d "$$tmp__" || tmp__=.;         \
59   TMPDIR=$$tmp__; export TMPDIR;                        \
60                                                         \
61   if test -n "$$BASH_VERSION" || (eval "export v=x") 2>/dev/null; then \
62     export_with_values () { export "$$@"; };            \
63   else                                                  \
64     export_with_values ()                               \
65     {                                                   \
66       sed_extract_var='s/=.*//';                        \
67       sed_quote_value="s/'/'\\\\''/g;s/=\\(.*\\)/='\\1'/";\
68       for arg in "$$@"; do                              \
69         var=`echo "$$arg" | sed "$$sed_extract_var"`;   \
70         arg=`echo "$$arg" | sed "$$sed_quote_value"`;   \
71         eval "$$arg";                                   \
72         export "$$var";                                 \
73       done;                                             \
74     };                                                  \
75   fi;                                                   \
76                                                         \
77   export_with_values                                    \
78   LC_ALL=C                                              \
79   VERSION=$(VERSION)                                    \
80   abs_top_builddir='$(abs_top_builddir)'                \
81   abs_top_srcdir='$(abs_top_srcdir)'                    \
82   abs_srcdir='$(abs_srcdir)'                            \
83   built_programs='$(built_programs)'                    \
84   srcdir='$(srcdir)'                                    \
85   top_srcdir='$(top_srcdir)'                            \
86   CC='$(CC)'                                            \
87   GREP='$(GREP)'                                        \
88   GZIP_TEST_NAME=`echo $$tst|sed 's,^\./,,;s,/,-,g'`    \
89   MAKE=$(MAKE)                                          \
90   PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)'              \
91   PACKAGE_VERSION=$(PACKAGE_VERSION)                    \
92   PERL='$(PERL)'                                        \
93   SHELL='$(SHELL)'                                      \
94   PATH='$(abs_top_builddir)$(PATH_SEPARATOR)'"$$PATH"   \
95   ; 9>&2
96
97 VERBOSE = yes