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

index dd0459a99edba12a71ad4bf51fea9925eb131a09..65cbca158961af927a847296691dacc2b63d948c 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 47b9467cd17a6a1c4066fe8fece6b11c7c49744d..e70903aeb703dcbf012e5b4e9d6d10423bd734bf 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 a96184f59e4c5d817a5f2fc5bd62d64b9c33bfe6..7ef4c8948478d6d5d8a70a91610dcdafa3cb7903 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 2d0b30a677fda557676ede6b58c04455fc57acb9..673026519b987d536d5b7f88b49ba1ed30d0f599 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 4034aa696eafcfd0c6cae613c28be7202585bce4..fef75e3deb57dc3a69b7c92c20e2ca5f3959ffcc 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 ed85ae8e57ea0bd6bd3398899e53a9fd36e7f399..1227a7311b755871e0519ca8e57915d175aa7e50 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
This page took 0.05984 seconds and 5 git commands to generate.