mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-05-05 16:58:06 +02:00
2009-03-30 Tollef Fog Heen <tfheen@err.no>
* check/common: Add support for non-zero return codes to test framework. Thanks to Loïc Minier for the idea.
This commit is contained in:
parent
a25f7e980e
commit
4070cc2339
2 changed files with 7 additions and 3 deletions
|
|
@ -1,5 +1,8 @@
|
|||
2009-03-30 Tollef Fog Heen <tfheen@err.no>
|
||||
|
||||
* check/common: Add support for non-zero return codes to test
|
||||
framework. Thanks to Loïc Minier for the idea.
|
||||
|
||||
* pkg.m4: Add PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR to the list of
|
||||
precious directories. (AC_ARG_VAR)
|
||||
|
||||
|
|
|
|||
|
|
@ -11,12 +11,13 @@ export PKG_CONFIG_PATH
|
|||
|
||||
run_test () {
|
||||
${pkgconfig} $ARGS >/dev/null 2>&1
|
||||
if [ "$?" -ne "0" ]; then
|
||||
echo "Running ${pkgconfig} $ARGS failed altogether, bailing"
|
||||
R=$?
|
||||
if [ "$R" -ne "${EXPECT_RETURN:-0}" ]; then
|
||||
echo "${pkgconfig} $ARGS exited with $R (expected $EXPECT_RETURN)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
R=$(${pkgconfig} $ARGS | sed -e 's,^[[:space:]]*,,' -e 's,[[:space:]]*$,,')
|
||||
R=$(${pkgconfig} $ARGS 2>&1 | sed -e 's,^[[:space:]]*,,' -e 's,[[:space:]]*$,,')
|
||||
if [ "$R" != "$RESULT" ]; then
|
||||
echo "${pkgconfig} $ARGS :"
|
||||
echo "'$R' != '$RESULT'"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue