gzip: Use 0x%04x instead of %x when printing 16-bit checksums
[gzip.git] / tests / Makefile.am
blob03eb4a3d557ebfb3629feca3939dac0c6493c707
1 ## Process this file with automake to create Makefile.in
2 # Copyright 2010 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 <http://www.gnu.org/licenses/>.
17 TESTS =                                 \
18   helin-segv                            \
19   help-version                          \
20   hufts                                 \
21   memcpy-abuse                          \
22   mixed                                 \
23   null-suffix-clobber                   \
24   stdin                                 \
25   trailing-nul                          \
26   zdiff                                 \
27   zgrep-f                               \
28   zgrep-signal                          \
29   znew-k
31 EXTRA_DIST =                            \
32   $(TESTS)                              \
33   init.cfg                              \
34   init.sh                               \
35   hufts-segv.gz
37 built_programs = \
38   gzip          \
39   gunzip        \
40   gzexe         \
41   zcat          \
42   zcmp          \
43   zdiff         \
44   zegrep        \
45   zfgrep        \
46   zforce        \
47   zgrep         \
48   zless         \
49   zmore         \
50   znew
52 TESTS_ENVIRONMENT =                             \
53   tmp__=$$TMPDIR; test -d "$$tmp__" || tmp__=.; \
54   TMPDIR=$$tmp__; export TMPDIR;                \
55   exec 9>&2;                                    \
56   shell_or_perl_() {                            \
57     if grep '^\#!/usr/bin/perl' "$$1" > /dev/null; then                 \
58       if $(PERL) -e 'use warnings' > /dev/null 2>&1; then               \
59         grep '^\#!/usr/bin/perl -T' "$$1" > /dev/null && T_=T || T_=;   \
60         $(PERL) -w$$T_ -I$(srcdir) -MCoreutils                          \
61               -M"CuTmpdir qw($$f)" -- "$$1";    \
62       else                                      \
63         echo 1>&2 "$$tst: configure did not find a usable version of Perl," \
64           "so skipping this test";              \
65         (exit 77);                              \
66       fi;                                       \
67     else                                        \
68       $(SHELL) "$$1";                           \
69     fi;                                         \
70   };                                            \
71   export                                        \
72   LC_ALL=C                                      \
73   VERSION=$(VERSION)                            \
74   abs_top_builddir='$(abs_top_builddir)'        \
75   abs_top_srcdir='$(abs_top_srcdir)'            \
76   abs_srcdir='$(abs_srcdir)'                    \
77   built_programs='$(built_programs)'            \
78   srcdir='$(srcdir)'                            \
79   top_srcdir='$(top_srcdir)'                    \
80   CC='$(CC)'                                    \
81   GZIP_TEST_NAME=`echo $$tst|sed 's,^\./,,;s,/,-,g'` \
82   MAKE=$(MAKE)                                  \
83   PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)'      \
84   PACKAGE_VERSION=$(PACKAGE_VERSION)            \
85   PERL='$(PERL)'                                \
86   SHELL='$(SHELL)'                              \
87   PATH='$(abs_top_builddir)$(PATH_SEPARATOR)'"$$PATH" \
88   ; shell_or_perl_
90 VERBOSE = yes