From 6489b1bc103459ffd26f36ba17224a746fc6f5e4 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Sat, 23 Feb 2008 10:47:20 +0100 Subject: [PATCH] Fix XFAIL_TESTS matching for NetBSD ksh. * 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 | 10 ++++++++++ README | 13 +++++++++++++ lib/Automake/tests/Makefile.in | 6 +++--- lib/am/check.am | 9 +++++---- tests/Makefile.in | 6 +++--- 5 files changed, 34 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index c2ffb48..748d60c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-02-23 Ralf Wildenhues + + * 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 PR automake/498 diff --git a/README b/README index 0ff5720..bb42a7f 100644 --- 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/ diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in index 79adf48..3b781ee 100644 --- a/lib/Automake/tests/Makefile.in +++ b/lib/Automake/tests/Makefile.in @@ -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; \ ;; \ diff --git a/lib/am/check.am b/lib/am/check.am index 9b1dc26..daae5a2 100644 --- a/lib/am/check.am +++ b/lib/am/check.am @@ -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; \ ;; \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 8a10b4b..4bf31fd 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -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; \ ;; \ -- 2.7.4