From d9077956e29b47bc4eabd4a77294f5b50248e757 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Thu, 27 May 2010 22:17:54 +0200 Subject: [PATCH] Fix up test framework to better report errors when pkg-config exits non-zero --- check/common | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/check/common b/check/common index b61d529..57aa806 100644 --- a/check/common +++ b/check/common @@ -13,10 +13,12 @@ export PKG_CONFIG_PATH export LC_ALL=C run_test () { + set +e ${pkgconfig} $ARGS >/dev/null 2>&1 R=$? if [ "$R" -ne "${EXPECT_RETURN:-0}" ]; then - echo "${pkgconfig} $ARGS exited with $R (expected $EXPECT_RETURN)" + ${pkgconfig} --print-errors $ARGS + echo "${pkgconfig} $ARGS exited with $R (expected ${EXPECT_RETURN:-0})" 1>&2 exit 1 fi