mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-05-08 12:28:13 +02:00
2005-03-29 Tollef Fog Heen <tfheen@err.no>
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.
This commit is contained in:
parent
61efa4f6c4
commit
96d4dc19c7
9 changed files with 81 additions and 2 deletions
|
|
@ -1,3 +1,12 @@
|
|||
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.
|
||||
|
||||
2005-03-28 Tollef Fog Heen <tfheen@err.no>
|
||||
|
||||
* glib-patches/distcheckfix.diff: Add some files to CLEANFILES so
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ if USE_INSTALLED_GLIB
|
|||
included_glib_includes = @GLIB_CFLAGS@
|
||||
pkg_config_LDADD=@GLIB_LIBS@
|
||||
else
|
||||
SUBDIRS = glib-1.2.8
|
||||
SUBDIRS = glib-1.2.8 check
|
||||
included_glib_includes = -I./glib-1.2.8
|
||||
pkg_config_LDADD=glib-1.2.8/libglib.la
|
||||
endif
|
||||
|
|
|
|||
3
check/Makefile.am
Normal file
3
check/Makefile.am
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
TESTS = check-cflags check-libs check-define-variable
|
||||
EXTRA_DIST = $(TESTS) common simple.pc
|
||||
10
check/check-cflags
Executable file
10
check/check-cflags
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
. ${srcdir}/common
|
||||
|
||||
ARGS="--cflags simple"
|
||||
RESULT=""
|
||||
|
||||
run_test
|
||||
10
check/check-define-variable
Executable file
10
check/check-define-variable
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
. ${srcdir}/common
|
||||
|
||||
ARGS="--define-variable=includedir=/includedir/ --cflags simple"
|
||||
RESULT="-I/includedir/"
|
||||
|
||||
run_test
|
||||
10
check/check-libs
Executable file
10
check/check-libs
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
. ${srcdir}/common
|
||||
|
||||
ARGS="--libs simple"
|
||||
RESULT="-lsimple"
|
||||
|
||||
run_test
|
||||
26
check/common
Normal file
26
check/common
Normal file
|
|
@ -0,0 +1,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
|
||||
}
|
||||
11
check/simple.pc
Normal file
11
check/simple.pc
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
prefix=/usr
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: Simple test
|
||||
Description: Dummy pkgconfig test package for testing pkgconfig
|
||||
Version: 1.0.0
|
||||
Requires:
|
||||
Libs: -lsimple
|
||||
Cflags: -I${includedir}
|
||||
|
|
@ -67,4 +67,4 @@ AC_FUNC_ALLOCA
|
|||
AC_CHECK_FUNCS(setresuid setreuid,break)
|
||||
AC_CHECK_HEADERS([dirent.h unistd.h sys/wait.h])
|
||||
|
||||
AC_OUTPUT([Makefile])
|
||||
AC_OUTPUT([Makefile check/Makefile])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue