New upstream version 1.9
[debian/gzip] / tests / Makefile.am
1 ## Process this file with automake to create Makefile.in
2 # Copyright 2010-2018 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 <https://www.gnu.org/licenses/>.
16
17 TESTS =                                 \
18   gzip-env                              \
19   helin-segv                            \
20   help-version                          \
21   hufts                                 \
22   keep                                  \
23   list                                  \
24   memcpy-abuse                          \
25   mixed                                 \
26   null-suffix-clobber                   \
27   stdin                                 \
28   timestamp                             \
29   trailing-nul                          \
30   unpack-invalid                        \
31   unpack-valid                          \
32   upper-suffix                          \
33   z-suffix                              \
34   zdiff                                 \
35   zgrep-f                               \
36   zgrep-context                         \
37   zgrep-signal                          \
38   znew-k
39
40 EXTRA_DIST =                            \
41   $(TESTS)                              \
42   init.cfg                              \
43   init.sh                               \
44   hufts-segv.gz
45
46 built_programs = \
47   gzip          \
48   gunzip        \
49   gzexe         \
50   zcat          \
51   zcmp          \
52   zdiff         \
53   zegrep        \
54   zfgrep        \
55   zforce        \
56   zgrep         \
57   zless         \
58   zmore         \
59   znew
60
61 TESTS_ENVIRONMENT =                                     \
62   tmp__=$$TMPDIR; test -d "$$tmp__" || tmp__=.;         \
63   TMPDIR=$$tmp__; export TMPDIR;                        \
64                                                         \
65   if test -n "$$BASH_VERSION" || (eval "export v=x") 2>/dev/null; then \
66     export_with_values () { export "$$@"; };            \
67   else                                                  \
68     export_with_values ()                               \
69     {                                                   \
70       sed_extract_var='s/=.*//';                        \
71       sed_quote_value="s/'/'\\\\''/g;s/=\\(.*\\)/='\\1'/";\
72       for arg in "$$@"; do                              \
73         var=`echo "$$arg" | sed "$$sed_extract_var"`;   \
74         arg=`echo "$$arg" | sed "$$sed_quote_value"`;   \
75         eval "$$arg";                                   \
76         export "$$var";                                 \
77       done;                                             \
78     };                                                  \
79   fi;                                                   \
80                                                         \
81   export_with_values                                    \
82   LC_ALL=C                                              \
83   VERSION=$(VERSION)                                    \
84   abs_top_builddir='$(abs_top_builddir)'                \
85   abs_top_srcdir='$(abs_top_srcdir)'                    \
86   abs_srcdir='$(abs_srcdir)'                            \
87   built_programs='$(built_programs)'                    \
88   srcdir='$(srcdir)'                                    \
89   top_srcdir='$(top_srcdir)'                            \
90   CC='$(CC)'                                            \
91   GREP='$(GREP)'                                        \
92   GZIP_TEST_NAME=`echo $$tst|sed 's,^\./,,;s,/,-,g'`    \
93   MAKE=$(MAKE)                                          \
94   PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)'              \
95   PACKAGE_VERSION=$(PACKAGE_VERSION)                    \
96   PERL='$(PERL)'                                        \
97   SHELL='$(SHELL)'                                      \
98   PATH='$(abs_top_builddir)$(PATH_SEPARATOR)'"$$PATH"   \
99   ; 9>&2
100
101 VERBOSE = yes