=== added file 'check/check-cflags-noexist' --- check/check-cflags-noexist 1970-01-01 00:00:00 +0000 +++ check/check-cflags-noexist 2007-12-18 23:50:24 +0000 @@ -0,0 +1,17 @@ +#! /bin/sh + +# Do the Solaris Dance: +if [ ! -d ~root ] ; then + exec /usr/xpg4/bin/sh $0 "$@" +fi + +set -e + +. ${srcdir}/common + +# noexist-test.pc has an existing Requires and a non-existent Requires.private +# cflags tests should fail since it pulls in Requires and Requires.private +# This test is added to XFAIL_TESTS +ARGS="--cflags noexist-test" +RESULT="" +run_test === added file 'check/check-libs-noexist' --- check/check-libs-noexist 1970-01-01 00:00:00 +0000 +++ check/check-libs-noexist 2007-12-18 23:50:24 +0000 @@ -0,0 +1,16 @@ +#! /bin/sh + +# Do the Solaris Dance: +if [ ! -d ~root ] ; then + exec /usr/xpg4/bin/sh $0 "$@" +fi + +set -e + +. ${srcdir}/common + +# noexist-test.pc has an existing Requires and a non-existent Requires.private +# libs tests should succeed since we don't pull in Requires.private +ARGS="--libs noexist-test" +RESULT="-L/noexist-test/lib -L/public-dep/lib -lnoexist-test -lpublic-dep" +run_test === added file 'check/check-libs-private-noexist' --- check/check-libs-private-noexist 1970-01-01 00:00:00 +0000 +++ check/check-libs-private-noexist 2007-12-18 23:50:24 +0000 @@ -0,0 +1,17 @@ +#! /bin/sh + +# Do the Solaris Dance: +if [ ! -d ~root ] ; then + exec /usr/xpg4/bin/sh $0 "$@" +fi + +set -e + +. ${srcdir}/common + +# noexist-test.pc has an existing Requires and a non-existent Requires.private +# libs static test should fail when we pull in Requires.private +# This test is added to XFAIL_TESTS +ARGS="--static --libs noexist-test" +RESULT="" +run_test === added file 'check/check-requires-noexist' --- check/check-requires-noexist 1970-01-01 00:00:00 +0000 +++ check/check-requires-noexist 2007-12-18 23:50:24 +0000 @@ -0,0 +1,22 @@ +#! /bin/sh + +# Do the Solaris Dance: +if [ ! -d ~root ] ; then + exec /usr/xpg4/bin/sh $0 "$@" +fi + +set -e + +. ${srcdir}/common + +# noexist-test.pc has an existing Requires and a non-existent Requires.private + +# calling --exists should succeed even if all requires don't exist +ARGS="--exists noexist-test" +RESULT="" +run_test + +# calling --modversion should succeed even if all requires don't exist +ARGS="--modversion noexist-test" +RESULT="1.0.0" +run_test === added file 'check/noexist-test.pc' --- check/noexist-test.pc 1970-01-01 00:00:00 +0000 +++ check/noexist-test.pc 2007-12-18 23:50:24 +0000 @@ -0,0 +1,7 @@ +Name: Non-existent Requires test package +Description: Dummy test package for testing non-existent Requires/Requires.private +Version: 1.0.0 +Requires: public-dep +Requires.private: noexist-dep +Libs: -L/noexist-test/lib -lnoexist-test +Cflags: -I/noexist-test/include === modified file 'ChangeLog' --- ChangeLog 2007-12-18 23:40:46 +0000 +++ ChangeLog 2007-12-18 23:50:24 +0000 @@ -1,5 +1,25 @@ 2007-12-18 Dan Nicholson + * check/check-requires-noexist: New test checking whether + --exists and --modversion work if a Requires package is missing. + + * check/check-cflags-noexist: New test checking that --cflags + fails when a Requires.private package is missing. + + * check/check-libs-noexist: New test checking that --libs still + works when a Requires.private package is missing. + + * check/check-libs-private-noexist: New test checking that + --static --libs fails when a Requires.private package is missing. + + * check/noexist-test.pc: New .pc file supporting tests of + pkg-config behavior with missing Requires packages. + + * check/Makefile.am: Add new tests and mark some as expected to + fail. + +2007-12-18 Dan Nicholson + * pkg.c: New global ignore_requires_private to allow the Requires.private to be ignored. (enable_requires, disable_requires): Helper functions for the === modified file 'check/Makefile.am' --- check/Makefile.am 2005-08-27 09:05:14 +0000 +++ check/Makefile.am 2007-12-18 23:50:24 +0000 @@ -1,7 +1,11 @@ TESTS = check-cflags check-libs check-define-variable \ - check-libs-private check-requires-private check-includedir + check-libs-private check-requires-private check-includedir \ + check-requires-noexist check-cflags-noexist \ + check-libs-noexist check-libs-private-noexist + +XFAIL_TESTS = check-cflags-noexist check-libs-private-noexist EXTRA_DIST = $(TESTS) common simple.pc requires-test.pc public-dep.pc \ - private-dep.pc includedir.pc + private-dep.pc includedir.pc noexist-test.pc