1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 2001, 2003 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; skip=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 \
34 all=`expr $$all + 1`; \
35 case " $(XFAIL_TESTS) " in \
37 xpass=`expr $$xpass + 1`; \
38 failed=`expr $$failed + 1`; \
39 echo "XPASS: $$tst"; \
45 elif test $$? -ne 77; then \
47 all=`expr $$all + 1`; \
48 case " $(XFAIL_TESTS) " in \
50 xfail=`expr $$xfail + 1`; \
51 echo "XFAIL: $$tst"; \
54 failed=`expr $$failed + 1`; \
60 skip=`expr $$skip + 1`; \
65 if test "$$failed" -eq 0; then \
66 if test "$$xfail" -eq 0; then \
67 banner="All $$all tests passed"; \
69 banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
72 if test "$$xpass" -eq 0; then \
73 banner="$$failed of $$all tests failed"; \
75 banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
78 ## DASHES should contain the largest line of the banner.
81 if test "$$skip" -ne 0; then \
82 skipped="($$skip tests were not run)"; \
83 test `echo "$$skipped" | wc -c` -gt `echo "$$banner" | wc -c` && \
87 if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
88 report="Please report to $(PACKAGE_BUGREPORT)"; \
89 test `echo "$$report" | wc -c` -gt `echo "$$banner" | wc -c` && \
92 dashes=`echo "$$dashes" | sed s/./=/g`; \
95 test -n "$$skipped" && echo "$$skipped"; \
96 test -n "$$report" && echo "$$report"; \
98 test "$$failed" -eq 0; \