Testsuite fixes
[platform/upstream/automake.git] / tests / Makefile.am
1 ## Process this file with automake to create Makefile.in
2
3 AUTOMAKE_OPTIONS = gnits
4
5 ## FIXME Ulrich has suggested implementing this in Automake.
6 ## Perhaps he is right.
7 TESTS = mdate.test vtexi.test acoutput.test instexec.test checkall.test
8
9 check-local:
10         @failed=0; all=0; \
11         srcdir=$(srcdir); export srcdir; \
12         for tst in $(TESTS); do \
13           all=`expr $$all + 1`; \
14 ## FIXME use $(SHELL) here?  That is what Ulrich suggests.  Maybe
15 ## a new macro, $(TEST_SHELL), a la $(CONFIG_SHELL)?
16 ## For now we just execute the file directly; this allows test files
17 ## which are compiled -- a possibly useful feature.
18           if test -f $$tst; then dir=.; \
19           else dir="$(srcdir)"; fi; \
20           $$dir/$$tst || { \
21             failed=`expr $$failed + 1`; \
22             echo "FAIL: $$tst"; \
23           } \
24         done; \
25         if test "$$failed" -eq 0; then \
26           echo "All $$all tests passed"; \
27         else \
28           echo "$$failed of $$all tests failed"; \
29         fi