diff options
author | Daiki Ueno <ueno@gnu.org> | 2014-09-05 15:14:04 +0900 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2014-09-05 15:22:16 +0900 |
commit | 892692a6c57e8a8d10cca6ccda907c4c488a6ca4 (patch) | |
tree | 9b90245bdeb2d4f2d4767df80d297be64cc2ee92 /gettext-tools | |
parent | 761098f61214e68d214ff058c69d3a621a37eb03 (diff) | |
download | external_gettext-892692a6c57e8a8d10cca6ccda907c4c488a6ca4.zip external_gettext-892692a6c57e8a8d10cca6ccda907c4c488a6ca4.tar.gz external_gettext-892692a6c57e8a8d10cca6ccda907c4c488a6ca4.tar.bz2 |
tests: Improve error handling in autopoint tests
Diffstat (limited to 'gettext-tools')
-rw-r--r-- | gettext-tools/tests/ChangeLog | 4 | ||||
-rwxr-xr-x | gettext-tools/tests/autopoint-2 | 12 | ||||
-rwxr-xr-x | gettext-tools/tests/autopoint-3 | 32 |
3 files changed, 34 insertions, 14 deletions
diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index b6af8af..dd1060a 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -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. diff --git a/gettext-tools/tests/autopoint-2 b/gettext-tools/tests/autopoint-2 index f7cdab1..30cc4e0 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 c16bd4a..3d1fc61 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 |