Fix up test framework to better report errors when pkg-config exits non-zero

This commit is contained in:
Tollef Fog Heen 2010-05-27 22:17:54 +02:00
parent 2ce485c65d
commit d9077956e2

View file

@ -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