mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-02-04 22:20:33 +01:00
Fix up test framework to better report errors when pkg-config exits non-zero
This commit is contained in:
parent
2ce485c65d
commit
d9077956e2
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue