The attached patch should make it easy to run *by default* the automake testsuite with the same shell used by the build system.
Before this patch, to force the consistent use of (say) ksh as the shell, I had to resort to something like: $ CONFIG_SHELL=/bin/ksh /bin/ksh ./configure CONFIG_SHELL=/bin/ksh $ make $ make (re)check TEST_LOG_COMPILER=/bin/ksh or even, for non-GNU makes: $ make (re)check TEST_LOG_COMPILER=/bin/ksh AM_MAKEFLAGS='TEST_LOG_COMPILER=/bin/ksh' where now I can simply do: $ CONFIG_SHELL=/bin/ksh /bin/ksh ./configure CONFIG_SHELL=/bin/ksh $ make $ make (re)check OK for maint? Regards, Stefano
From cd63d7bb6e08879a3593ca21619dd0a588926b1b Mon Sep 17 00:00:00 2001 From: Stefano Lattarini <stefano.lattar...@gmail.com> Date: Wed, 1 Sep 2010 22:14:24 +0200 Subject: [PATCH] Testsuite: use $SHELL to run tests which are shell scripts. * tests/Makefile.am (TEST_LOG_COMPILER): Define to $(SHELL), so that test script are run by default with the best shell detected at configure time, rather than with default system shell. (TEST_EXTENSIONS): Defined to `.test', for clarity. --- ChangeLog | 8 ++++++++ tests/Makefile.am | 3 +++ tests/Makefile.in | 3 ++- 3 files changed, 13 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 688f4be..6ff7e92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-09-01 Stefano Lattarini <stefano.lattar...@gmail.com> + + Testsuite: use $SHELL to run tests which are shell scripts. + * tests/Makefile.am (TEST_LOG_COMPILER): Define to $(SHELL), so + that test script are run by default with the best shell detected + at configure time, rather than with default system shell. + (TEST_EXTENSIONS): Defined to `.test', for clarity. + 2010-08-27 Stefano Lattarini <stefano.lattar...@gmail.com> Fix bug in test missing6.test. diff --git a/tests/Makefile.am b/tests/Makefile.am index 3ecc341..4fa625e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -16,6 +16,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +TEST_LOG_COMPILER = $(SHELL) +TEST_EXTENSIONS = .test + XFAIL_TESTS = \ all.test \ auxdir2.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 4671ad0..725bb51 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -146,7 +146,6 @@ RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check check-html recheck recheck-html TEST_SUITE_LOG = test-suite.log TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html) -TEST_EXTENSIONS = .test am__test_logs1 = $(TESTS:=.log) TEST_LOGS = $(am__test_logs1:.test.log=.log) TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ @@ -243,6 +242,8 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +TEST_LOG_COMPILER = $(SHELL) +TEST_EXTENSIONS = .test XFAIL_TESTS = \ all.test \ auxdir2.test \ -- 1.7.1