From: Stefano Lattarini Date: Fri, 10 Aug 2012 15:15:54 +0000 (+0200) Subject: [ng] tests: avoid spurious failure in a gettext test X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a0bf99a6d153629e605eb49cadfbbc6e6dbd7d8;p=thirdparty%2Fautomake.git [ng] tests: avoid spurious failure in a gettext test * t/gettext2.sh: Here, remove obsolete grepping checks in favor of more modern ones. * t/gettext.sh: Likewise. This doesn't fix any failure, but makes the test more reliable. Signed-off-by: Stefano Lattarini --- diff --git a/t/gettext.sh b/t/gettext.sh index a1925f17b..3527f7071 100755 --- a/t/gettext.sh +++ b/t/gettext.sh @@ -35,7 +35,6 @@ mkdir po intl # If aclocal fails here, it may be that gettext is too old to # provide AM_GNU_GETTEXT_VERSION. if $ACLOCAL; then - # autopoint will fail if it's from an older version. # If gettext is too old to provide autopoint, this will # fail as well, so we're safe here. @@ -49,7 +48,9 @@ fi sed '/AM_GNU_GETTEXT_VERSION/d' configure.ac >configure.int mv -f configure.int configure.ac +rm -rf autom4te.cache $ACLOCAL +$AUTOCONF # po/ and intl/ are required. @@ -70,12 +71,15 @@ echo 'SUBDIRS = po intl' >Makefile.am $AUTOMAKE --add-missing # Make sure distcheck runs './configure --with-included-gettext'. -grep 'with-included-gettext' Makefile.in +./configure +echo distdir: > po/Makefile +echo distdir: > intl/Makefile +$MAKE -n distcheck | grep '.*--with-included-gettext' # 'SUBDIRS = po intl' isn't required if po/ doesn't exist. # PR/381. -rmdir po +rm -rf po mkdir sub echo 'SUBDIRS = sub' >Makefile.am $AUTOMAKE @@ -85,3 +89,5 @@ $AUTOMAKE : >Makefile.am AUTOMAKE_fails --add-missing grep 'AM_GNU_GETTEXT.*SUBDIRS' stderr + +: diff --git a/t/gettext2.sh b/t/gettext2.sh index f3d91b04f..960ef3615 100755 --- a/t/gettext2.sh +++ b/t/gettext2.sh @@ -29,6 +29,7 @@ END mkdir foo po $ACLOCAL +$AUTOCONF # config.rpath is required. : >config.rpath @@ -49,7 +50,8 @@ $AUTOMAKE --add-missing # Don't try running ./configure --with-included-gettext if the # user is using AM_GNU_GETTEXT([external]). -grep 'with-included-gettext' Makefile.in && exit 1 +./configure +$MAKE -n distcheck | grep 'with-included-gettext' && exit 1 # intl/ isn't wanted with AM_GNU_GETTEXT([external]).