diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2011-06-06 13:58:04 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2011-06-06 13:58:04 +0000 |
commit | f9da9415bc724bbb285b71a56d23b292a4e5986b (patch) | |
tree | aa19b40ede7ab00cfc107f2d5071786754edd202 | |
parent | 5426223b2212f721525204360ccc8481bf3e9170 (diff) |
initial batch of tests for pkg-config(1), which are loong overdue.
this is far from complete, so tests will be added along the way.
ok sthen@
-rw-r--r-- | regress/usr.bin/pkg-config/Makefile | 67 | ||||
-rw-r--r-- | regress/usr.bin/pkg-config/pcdir/corrupt1.pc | 5 | ||||
-rw-r--r-- | regress/usr.bin/pkg-config/pcdir/corrupt2.pc | 2 | ||||
-rw-r--r-- | regress/usr.bin/pkg-config/pcdir/print-req-priv.pc | 4 | ||||
-rw-r--r-- | regress/usr.bin/pkg-config/pcdir/print-req-priv2.pc | 4 |
5 files changed, 82 insertions, 0 deletions
diff --git a/regress/usr.bin/pkg-config/Makefile b/regress/usr.bin/pkg-config/Makefile new file mode 100644 index 00000000000..f30d2966863 --- /dev/null +++ b/regress/usr.bin/pkg-config/Makefile @@ -0,0 +1,67 @@ +# $OpenBSD: Makefile,v 1.1 2011/06/06 13:58:03 jasper Exp $ + +#REGRESS_TARGETS=cmp-vers1 cmp-vers2 cmp-vers3 cmp-vers4 cmp-vers5 cmp-vers6 \ +# sysroot builddir define-variable print-provides print-req \ +# print-req-priv corrupt1 corrupt2 +REGRESS_TARGETS=corrupt1 corrupt2 print-req-priv + +cmp-vers1: + # Test regular versions (a < b) + +cmp-vers2: + # Test regular versions (a > b) + +cmp-vers3: + # Test regular versions (a = b) + +cmp-vers4: + # Test suffixed versions (alpha) + +cmp-vers5: + # Test suffixed versions (beta) + +cmp-vers6: + # Test suffixed versions (rc) + +sysroot: + # Test PKG_CONFIG_SYSROOT_DIR + +builddir: + # Test PKG_CONFIG_TOP_BUILD_DIR + +define-variable: + # Test --define-variable + +print-provides: + # Test --print-provides + +print-req: + # Test --print-requires + +print-req-priv: + # Test --print-requires-private + @echo "print-req-priv2>=0.0.1" > $@.want + @if PKG_CONFIG_PATH=${.CURDIR}/pcdir/ pkg-config \ + --print-requires-private $@ > $@.got; then false; fi + @diff -u $@.want $@.got + +corrupt1: + # Test for missing variables/fields + @echo "Package 'corrupt1' has no Version: field" > $@.want + @if PKG_CONFIG_PATH=${.CURDIR}/pcdir/ pkg-config \ + --exists $@ 2> $@.got; then false; fi + @diff -u $@.want $@.got + +corrupt2: + # Test for missing variables/fields + @echo "Package 'corrupt2' has no Name: field" > $@.want + @if PKG_CONFIG_PATH=${.CURDIR}/pcdir/ pkg-config \ + --exists $@ 2> $@.got; then false; fi + @diff -u $@.want $@.got + +clean: + rm -f *.want *.got + +.PHONY: ${REGRESS_TARGETS} + +.include <bsd.regress.mk> diff --git a/regress/usr.bin/pkg-config/pcdir/corrupt1.pc b/regress/usr.bin/pkg-config/pcdir/corrupt1.pc new file mode 100644 index 00000000000..1896e3836f0 --- /dev/null +++ b/regress/usr.bin/pkg-config/pcdir/corrupt1.pc @@ -0,0 +1,5 @@ +Name: corrupt1 +Description: pkg-config(1) regress file +Requires: +Libs: +Cflags: diff --git a/regress/usr.bin/pkg-config/pcdir/corrupt2.pc b/regress/usr.bin/pkg-config/pcdir/corrupt2.pc new file mode 100644 index 00000000000..fb5ddee5fea --- /dev/null +++ b/regress/usr.bin/pkg-config/pcdir/corrupt2.pc @@ -0,0 +1,2 @@ +Description: pkg-config(1) regress file +Version: 0.0.0 diff --git a/regress/usr.bin/pkg-config/pcdir/print-req-priv.pc b/regress/usr.bin/pkg-config/pcdir/print-req-priv.pc new file mode 100644 index 00000000000..985c6f9765f --- /dev/null +++ b/regress/usr.bin/pkg-config/pcdir/print-req-priv.pc @@ -0,0 +1,4 @@ +Name: print-req-priv +Description: pkg-config(1) regress file +Version: 0.0.0 +Requires.private: print-req-priv2>=0.0.1 diff --git a/regress/usr.bin/pkg-config/pcdir/print-req-priv2.pc b/regress/usr.bin/pkg-config/pcdir/print-req-priv2.pc new file mode 100644 index 00000000000..f0c05c49358 --- /dev/null +++ b/regress/usr.bin/pkg-config/pcdir/print-req-priv2.pc @@ -0,0 +1,4 @@ +Name: print-req-priv2 +Description: pkg-config(1) regress file +Version: 0.0.0 +Requires.private: |