From 65cd51576af61ad651c5f1546c4ded144017cfa4 Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Mon, 8 Mar 2021 22:06:38 -0500 Subject: [PATCH] Allow testsuite to run configure with alternate shells. For portability testing of autoconf macros, it is useful to be able to have the tests run configure with different shells. Add a global knob to do this: just run make check with TEST_SHELL=whatever and the testsuite will set CONFIG_SHELL in testcases appropriately. Or configure the whole package with CONFIG_SHELL and that will get passed down too. However, avoid running the testsuite itself by default with such a shell because that's not actually what we're trying to test. --- atlocal.in | 1 + tests/macros.at | 20 +++++++------------- testsuite.at | 15 +++++++++++++-- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/atlocal.in b/atlocal.in index 9fd159e..e19cb6a 100644 --- a/atlocal.in +++ b/atlocal.in @@ -1,3 +1,4 @@ : "${AWK=@AWK@}" : "${CC=@CC@}" : "${EXEEXT=@EXEEXT@}" +: "${TEST_SHELL=@SHELL@}" diff --git a/tests/macros.at b/tests/macros.at index 4c7c8dd..07d23ca 100644 --- a/tests/macros.at +++ b/tests/macros.at @@ -132,7 +132,7 @@ AC_CONFIG_FILES([test]) ]]) TEST_AUTORECONF -export LINGUAS='en_CA en'; TEST_CONFIGURE +LINGUAS='en_CA en'; export LINGUAS; TEST_CONFIGURE AT_CHECK([cat test], [0], [[POFILES = po/en.po MOFILES = po/en.mo @@ -198,43 +198,37 @@ AC_CONFIG_FILES([test]) ]]) TEST_AUTORECONF -export LINGUAS="en"; TEST_CONFIGURE +LINGUAS='en'; export LINGUAS; TEST_CONFIGURE AT_CHECK([cat test], [0], [[POFILES = po/en.po po/en_US.po po/ja.po po/zh.po MOFILES = po/en.mo ]]) -export LINGUAS="en_US"; TEST_CONFIGURE +LINGUAS='en_US'; export LINGUAS; TEST_CONFIGURE AT_CHECK([cat test], [0], [[POFILES = po/en.po po/en_US.po po/ja.po po/zh.po MOFILES = po/en.mo po/en_US.mo ]]) -export LINGUAS="en_CA"; TEST_CONFIGURE +LINGUAS='en_CA'; export LINGUAS; TEST_CONFIGURE AT_CHECK([cat test], [0], [[POFILES = po/en.po po/en_US.po po/ja.po po/zh.po MOFILES = po/en.mo ]]) -export LINGUAS="ja ko"; TEST_CONFIGURE +LINGUAS='ja ko'; export LINGUAS; TEST_CONFIGURE AT_CHECK([cat test], [0], [[POFILES = po/en.po po/en_US.po po/ja.po po/zh.po MOFILES = po/ja.mo ]]) -export LINGUAS="ja ko"; TEST_CONFIGURE +LINGUAS='ja_JP ko_KR'; export LINGUAS; TEST_CONFIGURE AT_CHECK([cat test], [0], [[POFILES = po/en.po po/en_US.po po/ja.po po/zh.po MOFILES = po/ja.mo ]]) -export LINGUAS="ja_JP ko_KR"; TEST_CONFIGURE -AT_CHECK([cat test], [0], -[[POFILES = po/en.po po/en_US.po po/ja.po po/zh.po -MOFILES = po/ja.mo -]]) - -export LINGUAS=""; TEST_CONFIGURE +LINGUAS=''; export LINGUAS; TEST_CONFIGURE AT_CHECK([cat test], [0], [[POFILES = po/en.po po/en_US.po po/ja.po po/zh.po MOFILES = @&t@ diff --git a/testsuite.at b/testsuite.at index 7e5ea5d..f25bb33 100644 --- a/testsuite.at +++ b/testsuite.at @@ -25,15 +25,26 @@ AC_OUTPUT cp "$srcdir/install-sh" \ "$srcdir/depcomp" \ "$srcdir/missing" \ - "$srcdir/config.guess" \ "$srcdir/config.sub" \ . +# Simplified config.guess script avoids some spurious testcase failures +# when using heirloom-sh on GNU/Linux. +config_guess=`"$srcdir/config.guess"` +cat >config.guess <