File: common

package info (click to toggle)
pkg-config 0.21-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,740 kB
  • ctags: 2,471
  • sloc: ansic: 22,670; sh: 11,232; makefile: 303
file content (26 lines) | stat: -rw-r--r-- 552 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# -*- 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
}