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