]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
tests: Improve error handling in autopoint tests
authorDaiki Ueno <ueno@gnu.org>
Fri, 5 Sep 2014 06:14:04 +0000 (15:14 +0900)
committerDaiki Ueno <ueno@gnu.org>
Fri, 5 Sep 2014 06:22:16 +0000 (15:22 +0900)
gettext-tools/tests/ChangeLog
gettext-tools/tests/autopoint-2
gettext-tools/tests/autopoint-3

index b6af8afb26cacf8b64f82d45049e328eeed1c72c..dd1060a135546a2d011619ccd22dcad785dd15da 100644 (file)
@@ -1,3 +1,7 @@
+2014-09-05  Daiki Ueno  <ueno@gnu.org>
+
+       * autopoint-2, autopoint-3: Collect error output.
+
 2014-07-14  Daiki Ueno  <ueno@gnu.org>
 
        * gettext 0.19.2 released.
index f7cdab12bca1da1832a4ea0f64a279b3615ec9c2..30cc4e0be8d050d6c6719df4b8759fd51121ba97 100755 (executable)
@@ -36,7 +36,8 @@ AC_CONFIG_FILES([po/Makefile.in])
 AC_OUTPUT
 EOF
 
-$gettext_datadir/autopoint >/dev/null 2>/dev/null || exit 1
+$gettext_datadir/autopoint >/dev/null 2>autopoint.err
+test $? = 0 || { cat autopoint.err; exit 1; }
 
 test ! -d intl || exit 1
 test -d m4 || exit 1
@@ -63,7 +64,8 @@ AC_CONFIG_FILES([po/Makefile.in])
 AC_OUTPUT
 EOF
 
-$gettext_datadir/autopoint >/dev/null 2>/dev/null || exit 1
+$gettext_datadir/autopoint >/dev/null 2>autopoint.err
+test $? = 0 || { cat autopoint.err; exit 1; }
 
 test -d intl || exit 1
 test -d m4 || exit 1
@@ -95,7 +97,8 @@ AC_CONFIG_FILES([po/Makefile.in])
 AC_OUTPUT
 EOF
 
-$gettext_datadir/autopoint >/dev/null 2>/dev/null || exit 1
+$gettext_datadir/autopoint >/dev/null 2>autopoint.err
+test $? = 0 || { cat autopoint.err; exit 1; }
 
 test ! -d intl || exit 1
 test ! -d m4 || exit 1
@@ -122,7 +125,8 @@ AC_CONFIG_FILES([po/Makefile.in])
 AC_OUTPUT
 EOF
 
-$gettext_datadir/autopoint >/dev/null 2>/dev/null || exit 1
+$gettext_datadir/autopoint >/dev/null 2>autopoint.err
+test $? = 0 || { cat autopoint.err; exit 1; }
 
 test ! -d intl || exit 1
 test -d m4 || exit 1
index c16bd4ad7968f38aaeb9d462de81fb17c523ae2a..3d1fc61b3c5cb2ddbb2baa72f1e374f26a4c47fc 100755 (executable)
@@ -31,7 +31,8 @@ AC_OUTPUT
 EOF
 
 : ${ACLOCAL=aclocal}
-${ACLOCAL} >/dev/null 2>/dev/null || exit 1
+${ACLOCAL} >/dev/null 2>autopoint.err
+test $? = 0 || { cat autopoint.err; exit 1; }
 
 : > Makefile.am
 
@@ -92,7 +93,8 @@ EOF
 cp -p "$abs_top_srcdir"/gnulib-lib/gettext.h .
 cp -p "$abs_top_srcdir"/examples/hello-c/hello.c .
 
-$gettext_datadir/autopoint -f >/dev/null 2>/dev/null || exit 1
+$gettext_datadir/autopoint -f >/dev/null 2>autopoint.err
+test $? = 0 || { cat autopoint.err; exit 1; }
 
 test -d intl || exit 1
 test -d m4 || exit 1
@@ -104,16 +106,23 @@ test -f po/Makefile.in.in || exit 1
 cp -p po/Makevars.template po/Makevars
 echo hello.c > po/POTFILES.in
 
-${ACLOCAL} -I m4 >/dev/null 2>/dev/null || exit 1
+${ACLOCAL} -I m4 >/dev/null 2>autopoint.err
+test $? = 0 || { cat autopoint.err; exit 1; }
+
 : ${AUTOHEADER=autoheader}
-${AUTOHEADER} >/dev/null 2>/dev/null || exit 1
-${AUTOCONF} >/dev/null 2>/dev/null || exit 1
-${AUTOMAKE} -a -c >/dev/null 2>/dev/null || exit 1
+${AUTOHEADER} >/dev/null 2>autopoint.err
+test $? = 0 || { cat autopoint.err; exit 1; }
+
+${AUTOCONF} >/dev/null 2>autopoint.err
+test $? = 0 || { cat autopoint.err; exit 1; }
+
+${AUTOMAKE} -a -c >/dev/null 2>autopoint.err
+test $? = 0 || { cat autopoint.err; exit 1; }
 
 # Check if libintl compiles.
 : ${CONFIG_SHELL=${SHELL-/bin/sh}}
-${CONFIG_SHELL} ./configure --with-included-gettext >/dev/null 2>/dev/null \
-    || exit 1
+${CONFIG_SHELL} ./configure --with-included-gettext >/dev/null 2>autpoint.err
+test $? = 0 || { cat autopoint.err; exit 1; }
 
 # Workaround for 0.18.3 or earlier: Processing intl/plural.y with
 # Bison 3.0.1 or later generates a wrong code.  Use pre-generated
@@ -127,7 +136,10 @@ case "$required_gettext_version" in
     ;;
 esac
 
-${MAKE} >/dev/null 2>/dev/null || exit 1
-${MAKE} dist >/dev/null 2>/dev/null || exit 1
+${MAKE} >/dev/null 2>autopoint.err
+test $? = 0 || { cat autopoint.err; exit 1; }
+
+${MAKE} dist >/dev/null 2>autopoint.err
+test $? = 0 || { cat autopoint.err; exit 1; }
 
 exit 0