summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2011-06-13 09:07:29 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2011-06-13 09:07:29 +0000
commit035411ad3d80d43abe5c9329eae6a18a54abffbb (patch)
tree49dca67b0d1792d160b5813d0e7eb88d19613b80 /regress/usr.bin
parentf4ed35da0ae58774ba5f2fcba9ba93baea0559a9 (diff)
fill in tests for getting/setting variables
Diffstat (limited to 'regress/usr.bin')
-rw-r--r--regress/usr.bin/pkg-config/Makefile18
1 files changed, 16 insertions, 2 deletions
diff --git a/regress/usr.bin/pkg-config/Makefile b/regress/usr.bin/pkg-config/Makefile
index 9d5f96e83c4..8c0a24f8bb1 100644
--- a/regress/usr.bin/pkg-config/Makefile
+++ b/regress/usr.bin/pkg-config/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.15 2011/06/12 18:16:39 jasper Exp $
+# $OpenBSD: Makefile,v 1.16 2011/06/13 09:07:28 jasper Exp $
REGRESS_TARGETS=cmp-vers1-1 \
cmp-vers1-2 \
@@ -33,6 +33,8 @@ REGRESS_TARGETS=cmp-vers1-1 \
logfile \
sysroot-cflags \
sysroot-libs \
+ variable-get \
+ variable-set \
missing-req-1 \
missing-req-2 \
missing-req-3 \
@@ -294,8 +296,20 @@ static-libs2:
# Test grabbing Libs.private from other packages in order
# Misc. tests
-define-variable:
+variable-get:
+ # Test --variable
+ @echo "/tmp" > ${WANT}
+ @PKG_CONFIG_PATH=${.CURDIR}/pcdir/ ${PKG_CONFIG} --errors-to-stdout \
+ --print-errors --variable prefix sysroot > ${GOT}
+ @diff -u ${WANT} ${GOT}
+
+variable-set:
# Test --define-variable
+ @echo "-I/usr/local2/include -I/usr/local2/include/foo" > ${WANT}
+ @PKG_CONFIG_PATH=${.CURDIR}/pcdir/ ${PKG_CONFIG} --errors-to-stdout \
+ --print-errors --define-variable=prefix=/usr/local2 \
+ --cflags sysroot > ${GOT}
+ @diff -u ${WANT} ${GOT}
# This fails as we read and check Requires as well as Requires.private where
# only Requires needs to be checked here as we ask for Libs and not Cflags.