Fix XFAIL_TESTS matching for NetBSD ksh.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 23 Feb 2008 09:47:20 +0000 (10:47 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 23 Feb 2008 09:47:20 +0000 (10:47 +0100)
* lib/am/check.am (check-TESTS): In the case patterns for
XFAILed tests, add literal bracket expression for matching
whitespace, as NetBSD 4.99.54 ksh does not understand a
bracket expression resulting from variable expansion.
* README: Explain how to run the Automake test suite, including
setting MAKE to test gmake.
Report by Patrick Welche.

ChangeLog
README
lib/Automake/tests/Makefile.in
lib/am/check.am
tests/Makefile.in

index c2ffb48..748d60c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-02-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * lib/am/check.am (check-TESTS): In the case patterns for
+       XFAILed tests, add literal bracket expression for matching
+       whitespace, as NetBSD 4.99.54 ksh does not understand a
+       bracket expression resulting from variable expansion.
+       * README: Explain how to run the Automake test suite, including
+       setting MAKE to test gmake.
+       Report by Patrick Welche.
+
 2008-02-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        PR automake/498
diff --git a/README b/README
index 0ff5720..bb42a7f 100644 (file)
--- a/README
+++ b/README
@@ -19,6 +19,19 @@ program to generate an `aclocal.m4' based on the contents of
 for augmenting autoconf.  It is intended that other package authors
 will write m4 macros which can be automatically used by aclocal.
 
+Automake has a test suite.  Use
+
+       make check
+
+to run it.  Capture its output in case of failing tests.  For more
+information, you can influence testing with the variables VERBOSE,
+MAKE, TESTS, keep_testdirs.  So for example, to run tests/check.test
+verbosely using gmake and to inspect the test directory afterwards,
+enter the tests directory and use
+
+       env VERBOSE=yes TESTS=check.test keep_testdirs=yes MAKE=gmake \
+         gmake -e check
+
 Automake has a page on the web.  See:
 
        http://sources.redhat.com/automake/
index 79adf48..3b781ee 100644 (file)
@@ -197,7 +197,7 @@ CTAGS:
 
 
 check-TESTS: $(TESTS)
-       @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[        ]'; \
+       @failed=0; all=0; xfail=0; xpass=0; skip=0; \
        srcdir=$(srcdir); export srcdir; \
        list=' $(TESTS) '; \
        $(am__tty_colors); \
@@ -209,7 +209,7 @@ check-TESTS: $(TESTS)
            if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
              all=`expr $$all + 1`; \
              case " $(XFAIL_TESTS) " in \
-             *$$ws$$tst$$ws*) \
+             *[\ \     ]$$tst[\ \      ]*) \
                xpass=`expr $$xpass + 1`; \
                failed=`expr $$failed + 1`; \
                col=$$red; res=XPASS; \
@@ -221,7 +221,7 @@ check-TESTS: $(TESTS)
            elif test $$? -ne 77; then \
              all=`expr $$all + 1`; \
              case " $(XFAIL_TESTS) " in \
-             *$$ws$$tst$$ws*) \
+             *[\ \     ]$$tst[\ \      ]*) \
                xfail=`expr $$xfail + 1`; \
                col=$$lgn; res=XFAIL; \
              ;; \
index 9b1dc26..daae5a2 100644 (file)
@@ -1,5 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001, 2003, 2006, 2007 Free Software Foundation, Inc.
+## Copyright (C) 2001, 2003, 2006, 2007, 2008 Free Software Foundation,
+## Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -38,7 +39,7 @@ endif !%?COLOR%
 .PHONY: check-TESTS
 
 check-TESTS: $(TESTS)
-       @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[        ]'; \
+       @failed=0; all=0; xfail=0; xpass=0; skip=0; \
        srcdir=$(srcdir); export srcdir; \
 ## Make sure Solaris VPATH-expands all members of this list, even
 ## the first and the last one; thus the spaces around $(TESTS)
@@ -55,7 +56,7 @@ check-TESTS: $(TESTS)
 ## Success
              all=`expr $$all + 1`; \
              case " $(XFAIL_TESTS) " in \
-             *$$ws$$tst$$ws*) \
+             *[\ \     ]$$tst[\ \      ]*) \
                xpass=`expr $$xpass + 1`; \
                failed=`expr $$failed + 1`; \
                col=$$red; res=XPASS; \
@@ -68,7 +69,7 @@ check-TESTS: $(TESTS)
 ## Failure
              all=`expr $$all + 1`; \
              case " $(XFAIL_TESTS) " in \
-             *$$ws$$tst$$ws*) \
+             *[\ \     ]$$tst[\ \      ]*) \
                xfail=`expr $$xfail + 1`; \
                col=$$lgn; res=XFAIL; \
              ;; \
index 8a10b4b..4bf31fd 100644 (file)
@@ -833,7 +833,7 @@ CTAGS:
 
 
 check-TESTS: $(TESTS)
-       @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[        ]'; \
+       @failed=0; all=0; xfail=0; xpass=0; skip=0; \
        srcdir=$(srcdir); export srcdir; \
        list=' $(TESTS) '; \
        $(am__tty_colors); \
@@ -845,7 +845,7 @@ check-TESTS: $(TESTS)
            if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
              all=`expr $$all + 1`; \
              case " $(XFAIL_TESTS) " in \
-             *$$ws$$tst$$ws*) \
+             *[\ \     ]$$tst[\ \      ]*) \
                xpass=`expr $$xpass + 1`; \
                failed=`expr $$failed + 1`; \
                col=$$red; res=XPASS; \
@@ -857,7 +857,7 @@ check-TESTS: $(TESTS)
            elif test $$? -ne 77; then \
              all=`expr $$all + 1`; \
              case " $(XFAIL_TESTS) " in \
-             *$$ws$$tst$$ws*) \
+             *[\ \     ]$$tst[\ \      ]*) \
                xfail=`expr $$xfail + 1`; \
                col=$$lgn; res=XFAIL; \
              ;; \