automake-ng
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-NG] [FYI] [ng] tests: avoid spurious failure in a gettext test


From: Stefano Lattarini
Subject: [Automake-NG] [FYI] [ng] tests: avoid spurious failure in a gettext test
Date: Fri, 10 Aug 2012 17:16:33 +0200

* 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 <address@hidden>
---
 t/gettext.sh  | 12 +++++++++---
 t/gettext2.sh |  4 +++-
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/t/gettext.sh b/t/gettext.sh
index a1925f1..3527f70 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 f3d91b0..960ef36 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]).
 
-- 
1.7.12.rc0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]