mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-01-03 20:40:09 +01:00
Author: tfheen
Date: 2005-03-29 07:09:37 GMT
2005-03-29 Tollef Fog Heen <tfheen@err.no>
* check/check-cflags, check/check-define-variable,
check/check-libs, check/common, check/Makefile.am,
check/simple.pc: Add simple test framework and begin writing
tests.
* Makefile.am, configure.in: Make in check/ as well.
26 lines
552 B
Bash
26 lines
552 B
Bash
# -*- sh -*-
|
|
#
|
|
# This file is sourced by the different test scripts. It needs to be
|
|
# valid POSIX sh.
|
|
#
|
|
|
|
pkgconfig=../pkg-config
|
|
|
|
PKG_CONFIG_PATH=$srcdir
|
|
export PKG_CONFIG_PATH
|
|
|
|
run_test () {
|
|
${pkgconfig} $ARGS >/dev/null 2>&1
|
|
if [ "$?" -ne "0" ]; then
|
|
echo "Running ${pkgconfig} $ARGS failed altogether, bailing"
|
|
exit 1
|
|
fi
|
|
|
|
R=$(${pkgconfig} $ARGS | sed -e 's,^[[:space:]]*,,' -e 's,[[:space:]]*$,,')
|
|
if [ "$R" != "$RESULT" ]; then
|
|
echo "${pkgconfig} $ARGS :"
|
|
echo "'$R' != '$RESULT'"
|
|
exit 1
|
|
fi
|
|
return
|
|
}
|