maint: move definition of XFAIL_TESTS near TESTS
[platform/upstream/automake.git] / tests / Makefile.am
1 ## Process this file with automake to create Makefile.in
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
4 # 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
5 # Inc.
6
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
11
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
20 include $(srcdir)/parallel-tests.am
21
22 $(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am
23         $(AM_V_GEN)(cd $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@
24
25 $(parallel_tests): $(parallel_tests:-p.test=.test) Makefile.am
26         $(AM_V_GEN)input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'` \
27           && sed 's|^\. \./defs.*|parallel_tests=yes; &|' \
28                < $(srcdir)/$$input >$@ \
29           && chmod a+rx $@
30
31 MAINTAINERCLEANFILES = $(parallel_tests)
32
33 # Some testsuite-influential variables should be overridable from the
34 # test scripts, but not from the environment.
35 TESTS_ENVIRONMENT = \
36   test x"$$me" = x || unset me; \
37   test x"$$required" = x || unset required; \
38   test x"$$parallel_tests" = x || unset parallel_tests;
39
40 TEST_EXTENSIONS = .pl .test
41
42 PL_LOG_COMPILER = $(PERL)
43 AM_PL_LOG_FLAGS = -Mstrict -I $(top_builddir)/lib -I $(top_srcdir)/lib -w
44
45 include $(srcdir)/list-of-tests.mk
46
47 TESTS = $(handwritten_TESTS) $(parallel_tests)
48
49 # FIXME: make these automatically computed once we are merged into
50 # FIXME: the `testsuite-work' branch.
51 ar-lib4.log: libtool-macros.log
52 ar-lib6a.log: libtool-macros.log
53 ar-lib6b.log: libtool-macros.log
54 depcomp4.log: libtool-macros.log
55 depcomp7.log: libtool-macros.log
56 depcomp8b.log: libtool-macros.log
57 extradep2.log: libtool-macros.log
58 fort5.log: libtool-macros.log
59 instdir-ltlib.log: libtool-macros.log
60 instfail-libtool.log: libtool-macros.log
61 ldadd.log: libtool-macros.log
62 ldflags.log: libtool-macros.log
63 libobj13.log: libtool-macros.log
64 libtoo10.log: libtool-macros.log
65 libtoo11.log: libtool-macros.log
66 libtool.log: libtool-macros.log
67 libtool2.log: libtool-macros.log
68 libtool3.log: libtool-macros.log
69 libtool5.log: libtool-macros.log
70 libtool6.log: libtool-macros.log
71 libtool7.log: libtool-macros.log
72 libtool8.log: libtool-macros.log
73 libtool9.log: libtool-macros.log
74 listval.log: libtool-macros.log
75 ltcond.log: libtool-macros.log
76 ltcond2.log: libtool-macros.log
77 ltconv.log: libtool-macros.log
78 ltdeps.log: libtool-macros.log
79 ltinit.log: libtool-macros.log
80 ltinstloc.log: libtool-macros.log
81 ltlibobjs.log: libtool-macros.log
82 ltlibsrc.log: libtool-macros.log
83 ltorder.log: libtool-macros.log
84 nobase-libtool.log: libtool-macros.log
85 pr211.log: libtool-macros.log
86 pr300-ltlib.log: libtool-macros.log
87 pr307.log: libtool-macros.log
88 pr401b.log: libtool-macros.log
89 pr72.log: libtool-macros.log
90 reqd2.log: libtool-macros.log
91 silent3.log: libtool-macros.log
92 silent4.log: libtool-macros.log
93 silent9.log: libtool-macros.log
94 stdlib2.log: libtool-macros.log
95 strip3.log: libtool-macros.log
96 subobj9.log: libtool-macros.log
97 suffix10.log: libtool-macros.log
98 suffix2.log: libtool-macros.log
99 suffix5.log: libtool-macros.log
100 suffix8.log: libtool-macros.log
101 vala.log: libtool-macros.log
102 vala1.log: libtool-macros.log
103 vala2.log: libtool-macros.log
104 vala3.log: libtool-macros.log
105 vala4.log: libtool-macros.log
106 vala5.log: libtool-macros.log
107
108 # FIXME: make these automatically computed once we are merged into
109 # FIXME: the `testsuite-work' branch.
110 gettext.log: gettext-macros.log
111 gettext2.log: gettext-macros.log
112 gettext3.log: gettext-macros.log
113 subcond.log: gettext-macros.log
114
115 EXTRA_DIST = ChangeLog-old gen-parallel-tests $(TESTS)
116
117 distcheck-missing-m4.log distcheck-outdated-m4.log: distcheck-hook-m4.am
118 EXTRA_DIST += distcheck-hook-m4.am
119
120 # Each test case depends on defs, aclocal, and automake.
121 check_SCRIPTS = defs aclocal-$(APIVERSION) automake-$(APIVERSION)
122
123 ## Checking the list of tests.
124 test_subdirs = . pm
125 include $(srcdir)/CheckListOfTests.am
126 maintainer-check-list-of-tests: $(parallel_tests)
127
128 clean-local: clean-local-check
129 .PHONY: clean-local-check
130 clean-local-check:
131         -set x *.dir; shift; \
132          if test "$$#,$$1" = "1,*.dir"; then \
133            : there is no test directory to clean; \
134          else \
135            find "$$@" -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
136            rm -rf "$$@"; \
137          fi;