From: Daiki Ueno Date: Fri, 5 Sep 2014 06:14:04 +0000 (+0900) Subject: tests: Improve error handling in autopoint tests X-Git-Tag: v0.19.2.1~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=892692a6c57e8a8d10cca6ccda907c4c488a6ca4;p=thirdparty%2Fgettext.git tests: Improve error handling in autopoint tests --- diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index b6af8afb2..dd1060a13 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,7 @@ +2014-09-05 Daiki Ueno + + * autopoint-2, autopoint-3: Collect error output. + 2014-07-14 Daiki Ueno * gettext 0.19.2 released. diff --git a/gettext-tools/tests/autopoint-2 b/gettext-tools/tests/autopoint-2 index f7cdab12b..30cc4e0be 100755 --- a/gettext-tools/tests/autopoint-2 +++ b/gettext-tools/tests/autopoint-2 @@ -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 diff --git a/gettext-tools/tests/autopoint-3 b/gettext-tools/tests/autopoint-3 index c16bd4ad7..3d1fc61b3 100755 --- a/gettext-tools/tests/autopoint-3 +++ b/gettext-tools/tests/autopoint-3 @@ -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