summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2015-12-15 17:23:00 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2016-01-25 15:05:49 +0000
commit7eb34fc2cdb637974976ccaf3a9996059f09758f (patch)
treeb3098bf75a4a43801cc6d3bd904e90e9c14c80b0
parente18b4eb14cfa1a3007194d7d162ceff111eee753 (diff)
downloaddbus-7eb34fc2cdb637974976ccaf3a9996059f09758f.tar.gz
test/name-test/run-test.sh: output correct result if a C test fails
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>
-rwxr-xr-xtest/name-test/run-test.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/name-test/run-test.sh b/test/name-test/run-test.sh
index 1e257a16..8b9e7ad1 100755
--- a/test/name-test/run-test.sh
+++ b/test/name-test/run-test.sh
@@ -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" "$@"
}