1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright 2001 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 2, or (at your option)
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, write to the Free Software
16 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22 @failed=0; all=0; xfail=0; xpass=0; \
23 srcdir=$(srcdir); export srcdir; \
25 if test -n "$$list"; then \
26 for tst in $$list; do \
27 if test -f ./$$tst; then dir=./; \
28 ## Note: Solaris 2.7 seems to expand TESTS using VPATH. That's
29 ## why we also try `dir='
30 elif test -f $$tst; then dir=; \
31 else dir="$(srcdir)/"; fi; \
32 if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
33 all=`expr $$all + 1`; \
34 case " $(XFAIL_TESTS) " in \
36 xpass=`expr $$xpass + 1`; \
37 failed=`expr $$failed + 1`; \
38 echo "XPASS: $$tst"; \
44 elif test $$? -ne 77; then \
45 all=`expr $$all + 1`; \
46 case " $(XFAIL_TESTS) " in \
48 xfail=`expr $$xfail + 1`; \
49 echo "XFAIL: $$tst"; \
52 failed=`expr $$failed + 1`; \
58 if test "$$failed" -eq 0; then \
59 if test "$$xfail" -eq 0; then \
60 banner="All $$all tests passed"; \
62 banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
65 if test "$$xpass" -eq 0; then \
66 banner="$$failed of $$all tests failed"; \
68 banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
71 dashes=`echo "$$banner" | sed s/./=/g`; \
75 test "$$failed" -eq 0; \