test fixes
authorTom Tromey <tromey@redhat.com>
Mon, 23 Jun 1997 01:37:37 +0000 (01:37 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 23 Jun 1997 01:37:37 +0000 (01:37 +0000)
ChangeLog
Makefile.in
automake.in
automake.texi
m4/Makefile.in
tests/Makefile.in

index dd0459a..65cbca1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,13 @@
 Sun Jun 22 14:01:59 1997  Tom Tromey  <tromey@cygnus.com>
 
+       * automake.in (handle_tests): Exit status `77' means `ignore
+       test'.  From François Pinard.
+       (handle_tests) Also, make banner same size as text.
+
        * automake.in (handle_configure): Don't handle PRE_BUILT_SOURCES.
        (handle_built_sources): Likewise; don't have `all' depend on
        BUILT_SOURCES.
+
        * depend.am (DEPS_MAGIC): New variable.
        (.deps/.P): Depend on BUILT_SOURCES again.
 
index 47b9467..e70903a 100644 (file)
@@ -1,6 +1,6 @@
 # Makefile.in generated automatically by automake 1.1q from Makefile.am
 
-# Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 
@@ -239,7 +239,7 @@ install-info-am: $(INFO_DEPS)
        @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
          for file in $(INFO_DEPS); do \
            echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
-           install-info --info-dir=$(infodir) $(infodir)/$$file; :;\
+           install-info --info-dir=$(infodir) $(infodir)/$$file || :;\
          done; \
        else : ; fi
 
index a96184f..7ef4c89 100755 (executable)
@@ -3690,24 +3690,27 @@ sub handle_tests
        @failed=0; all=0; \\
        srcdir=$(srcdir); export srcdir; \\
        for tst in $(TESTS); do \\
-         all=`expr $$all + 1`; \\
          if test -f $$tst; then dir=.; \\
          else dir="$(srcdir)"; fi; \\
          if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \\
+           all=`expr $$all + 1`; \\
            echo "PASS: $$tst"; \\
-         else \\
+         elif test $$? -ne 77; then \\
+           all=`expr $$all + 1`; \\
            failed=`expr $$failed + 1`; \\
            echo "FAIL: $$tst"; \\
          fi; \\
        done; \\
        if test "$$failed" -eq 0; then \\
-         echo "========================"; \\
-         echo "All $$all tests passed"; \\
-         echo "========================"; \\
+         banner="All $$all tests passed"; \\
        else \\
-         echo "$$failed of $$all tests failed"; \\
-         exit 1; \\
-       fi
+         banner="$$failed of $$all tests failed"; \\
+       fi; \\
+       dashes=`echo "$$banner" | sed s/./=/g`; \\
+       echo "$$dashes"; \\
+       echo "$$banner"; \\
+       echo "$$dashes"; \\
+       test "$$failed" -eq 0
 ';
     }
 }
index 2d0b30a..6730265 100644 (file)
@@ -2093,13 +2093,18 @@ Automake supports a two forms of test suite.
 If the variable @code{TESTS} is defined, its value is taken to be a list
 of programs to run in order to do the testing.  The programs can either
 be derived objects or source objects; the generated rule will look both
-in @var{srcdir} and @file{.}.  The number of failures will be printed at
-the end of the run.  The variable @code{TESTS_ENVIRONMENT} can be used
-to set environment variables for the test run; the environment variable
-@code{srcdir} is set in the rule.  If all your test programs are
-scripts, you can also set @code{TESTS_ENVIRONMENT} to an invocation of
-the shell (eg @samp{$(SHELL) -x}); this can be useful for debugging the
-tests.
+in @var{srcdir} and @file{.}.
+
+The number of failures will be printed at the end of the run.  If a
+given test program exits with a status of 77, then its result is ignored
+in the final count.  This feature allows non-portable tests to be
+ignored in environments where they don't make sense.
+
+The variable @code{TESTS_ENVIRONMENT} can be used to set environment
+variables for the test run; the environment variable @code{srcdir} is
+set in the rule.  If all your test programs are scripts, you can also
+set @code{TESTS_ENVIRONMENT} to an invocation of the shell (eg
+@samp{$(SHELL) -x}); this can be useful for debugging the tests.
 @vindex TESTS
 @vindex TESTS_ENVIRONMENT
 
index 4034aa6..fef75e3 100644 (file)
@@ -1,6 +1,6 @@
 # Makefile.in generated automatically by automake 1.1q from Makefile.am
 
-# Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 
index ed85ae8..1227a73 100644 (file)
@@ -1,6 +1,6 @@
 # Makefile.in generated automatically by automake 1.1q from Makefile.am
 
-# Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 
@@ -124,24 +124,27 @@ check-TESTS: $(TESTS)
        @failed=0; all=0; \
        srcdir=$(srcdir); export srcdir; \
        for tst in $(TESTS); do \
-         all=`expr $$all + 1`; \
          if test -f $$tst; then dir=.; \
          else dir="$(srcdir)"; fi; \
          if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \
+           all=`expr $$all + 1`; \
            echo "PASS: $$tst"; \
-         else \
+         elif test $$? -ne 77; then \
+           all=`expr $$all + 1`; \
            failed=`expr $$failed + 1`; \
            echo "FAIL: $$tst"; \
          fi; \
        done; \
        if test "$$failed" -eq 0; then \
-         echo "========================"; \
-         echo "All $$all tests passed"; \
-         echo "========================"; \
+         banner="All $$all tests passed"; \
        else \
-         echo "$$failed of $$all tests failed"; \
-         exit 1; \
-       fi
+         banner="$$failed of $$all tests failed"; \
+       fi; \
+       dashes=`echo "$$banner" | sed s/./=/g`; \
+       echo "$$dashes"; \
+       echo "$$banner"; \
+       echo "$$dashes"; \
+       test "$$failed" -eq 0
 info:
 dvi:
 check: all