Rewritten testsuite in autotest
[debian/tar] / tests / Makefile.am
1 # Makefile for GNU tar regression tests.
2
3 # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2003, 2004 Free Software
4 # Foundation, Inc.
5
6 # François Pinard <pinard@iro.umontreal.ca>, 1988.
7 # Sergey Poznyakoff <gray@mirddin.farlep.net>, 2004.
8
9 ## This program is free software; you can redistribute it and/or modify
10 ## it under the terms of the GNU General Public License as published by
11 ## the Free Software Foundation; either version 2, or (at your option)
12 ## any later version.
13
14 ## This program is distributed in the hope that it will be useful,
15 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 ## GNU General Public License for more details.
18
19 ## You should have received a copy of the GNU General Public License
20 ## along with this program; if not, write to the Free Software
21 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22 ## 02111-1307, USA.
23
24 EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4 star/README
25 DISTCLEANFILES       = atconfig $(check_SCRIPTS)
26 MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
27
28 ## ------------ ##
29 ## package.m4.  ##
30 ## ------------ ##
31
32 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
33         {                                      \
34           echo '# Signature of the current package.'; \
35           echo 'm4_define([AT_PACKAGE_NAME],      [@PACKAGE_NAME@])'; \
36           echo 'm4_define([AT_PACKAGE_TARNAME],   [@PACKAGE_TARNAME@])'; \
37           echo 'm4_define([AT_PACKAGE_VERSION],   [@PACKAGE_VERSION@])'; \
38           echo 'm4_define([AT_PACKAGE_STRING],    [@PACKAGE_STRING@])'; \
39           echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
40         } >$(srcdir)/package.m4
41
42 #
43
44 ## ------------ ##
45 ## Test suite.  ##
46 ## ------------ ##
47
48 TESTSUITE_AT = \
49  testsuite.at\
50  delete01.at\
51  delete02.at\
52  delete03.at\
53  delete04.at\
54  extrac01.at\
55  extrac02.at\
56  extrac03.at\
57  extrac04.at\
58  extrac05.at\
59  gzip.at\
60  incremental.at\
61  ignfail.at\
62  link01.at\
63  listed01.at\
64  listed02.at\
65  longv7.at\
66  multiv01.at\
67  multiv02.at\
68  multiv03.at\
69  old.at\
70  options.at\
71  recurse.at\
72  same-order01.at\
73  same-order02.at\
74  sparse01.at\
75  volume.at\
76  version.at\
77  star/gtarfail.at\
78  star/gtarfail2.at\
79  star/multi-fail.at\
80  star/ustar-big-2g.at\
81  star/ustar-big-8g.at\
82  star/pax-big-10g.at
83
84 TESTSUITE = $(srcdir)/testsuite
85
86 AUTOTEST = $(AUTOM4TE) --language=autotest
87 $(TESTSUITE): package.m4 $(TESTSUITE_AT)
88         $(AUTOTEST) -I $(srcdir) testsuite.at -o $@.tmp
89         mv $@.tmp $@
90
91 atconfig: $(top_builddir)/config.status
92         cd $(top_builddir) && ./config.status tests/$@
93
94 clean-local:
95         $(SHELL) $(TESTSUITE) --clean
96
97 check-local: atconfig atlocal $(TESTSUITE)
98         $(SHELL) $(TESTSUITE)
99
100 #check_SCRIPTS = tar
101
102 # Run the test suite on the *installed* tree.
103 installcheck-local:
104         $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
105
106
107 ## ------------ ##
108 ## genfile      ##
109 ## ------------ ##
110
111 check_PROGRAMS = genfile
112
113 genfile_SOURCES = genfile.c
114
115 localedir = $(datadir)/locale
116 INCLUDES = -I$(top_srcdir)/lib -I../lib -I$(top_srcdir)/src
117
118 LDADD = ../lib/libtar.a $(LIBINTL)
119