test/name-test/run-test.sh: output correct result if a C test fails
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 15 Dec 2015 17:23:00 +0000 (17:23 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 25 Jan 2016 15:05:49 +0000 (15:05 +0000)
Loosely based on a patch from amit tewari.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93379
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
test/name-test/run-test.sh

index 1e257a1..8b9e7ad 100755 (executable)
@@ -48,10 +48,8 @@ c_test () {
   shift
   e=0
   echo "# running test $t"
-  if ! "${DBUS_TOP_BUILDDIR}/libtool" --mode=execute $DEBUG "$DBUS_TOP_BUILDDIR/test/name-test/$t" "$@" >&2; then
-    e=$?
-    echo "# exit status $e"
-  fi
+  "${DBUS_TOP_BUILDDIR}/libtool" --mode=execute $DEBUG "$DBUS_TOP_BUILDDIR/test/name-test/$t" "$@" >&2 || e=$?
+  echo "# exit status $e"
   interpret_result "$e" "$t" "$@"
 }