Don't show test output unless CHECK_VERBOSE is set.
Fixes: bgo 657456
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_SRCDIR([configure.ac])
AM_INIT_AUTOMAKE([1.11 dist-xz no-define
- no-dist-gzip tar-ustar -Wno-portability])
+ no-dist-gzip tar-ustar -Wno-portability color-tests])
AM_MAINTAINER_MODE([enable])
AC_PROG_CC
dbus_start
e=0
-"$@" || e=$?
+
+if test -t 1 && test "z$CHECK_VERBOSE" != z; then
+ "$@" || e=$?
+else
+ "$@" > capture-$$.log 2>&1 || e=$?
+fi
trap - INT HUP TERM
cleanup
-exit $e
+# if exit code is 0, check for skipped tests
+if test z$e = z0; then
+ grep -i skipped capture-$$.log || true
+ rm -f capture-$$.log
+# exit code is not 0, so output log and exit
+else
+ cat capture-$$.log
+ exit $e
+fi