New test
[automake.git] / tests / Makefile.am
blob675b95c1504e324f1c87b63c77b441568940d3e1
1 ## Process this file with automake to create Makefile.in
3 AUTOMAKE_OPTIONS = gnits
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 acoutnoq.test acouttbs.test
10 DIST_OTHER = $(TESTS)
12 check-local:
13         @failed=0; all=0; \
14         srcdir=$(srcdir); export srcdir; \
15         for tst in $(TESTS); do \
16           all=`expr $$all + 1`; \
17 ## FIXME use $(SHELL) here?  That is what Ulrich suggests.  Maybe
18 ## a new macro, $(TEST_SHELL), a la $(CONFIG_SHELL)?
19 ## For now we just execute the file directly; this allows test files
20 ## which are compiled -- a possibly useful feature.
21           if test -f $$tst; then dir=.; \
22           else dir="$(srcdir)"; fi; \
23           $$dir/$$tst || { \
24             failed=`expr $$failed + 1`; \
25             echo "FAIL: $$tst"; \
26           } \
27         done; \
28         if test "$$failed" -eq 0; then \
29           echo "All $$all tests passed"; \
30         else \
31           echo "$$failed of $$all tests failed"; \
32         fi