dovecot-2.2: dovecot.m4: If run-test.sh fails, print the failing...

dovecot at dovecot.org dovecot at dovecot.org
Fri May 29 08:10:48 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/5e523f0bbdf8
changeset: 18757:5e523f0bbdf8
user:      Timo Sirainen <tss at iki.fi>
date:      Fri May 29 11:08:29 2015 +0300
description:
dovecot.m4: If run-test.sh fails, print the failing command to stderr.
Currently otherwise the way Dovecot tests are run it's not clearly visible.

diffstat:

 dovecot.m4 |  32 ++++++++++++++++++--------------
 1 files changed, 18 insertions(+), 14 deletions(-)

diffs (50 lines):

diff -r 2dd8308f5d57 -r 5e523f0bbdf8 dovecot.m4
--- a/dovecot.m4	Fri May 29 10:43:38 2015 +0300
+++ b/dovecot.m4	Fri May 29 11:08:29 2015 +0300
@@ -6,7 +6,7 @@
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-# serial 15
+# serial 16
 
 AC_DEFUN([DC_DOVECOT_MODULEDIR],[
 	AC_ARG_WITH(moduledir,
@@ -40,20 +40,24 @@
 shift
 
 if test "\$NOVALGRIND" != ""; then
-  exec \$[*]
+  \$[*]
+  ret=\$?
+else
+  trap "rm -f test.out.\$\$" 0 1 2 3 15
+  supp_path="\$top_srcdir/run-test-valgrind.supp"
+  if test -r "\$supp_path"; then
+    valgrind -q --suppressions="\$supp_path" --log-file=test.out.\$\$ \$[*]
+  else
+    valgrind -q --log-file=test.out.\$\$ \$[*]
+  fi
+  ret=\$?
+  if test -s test.out.\$\$; then
+    cat test.out.\$\$
+    ret=1
+  fi
 fi
-
-trap "rm -f test.out.\$\$" 0 1 2 3 15
-supp_path="\$top_srcdir/run-test-valgrind.supp"
-if test -r "\$supp_path"; then
-  valgrind -q --suppressions="\$supp_path" --log-file=test.out.\$\$ \$[*]
-else
-  valgrind -q --log-file=test.out.\$\$ \$[*]
-fi
-ret=\$?
-if test -s test.out.\$\$; then
-  cat test.out.\$\$
-  exit 1
+if test \$ret != 0; then
+  echo "Failed to run: \$[*]" >&2
 fi
 exit \$ret
 EOF


More information about the dovecot-cvs mailing list