From 25b730fbf6030800a491ecd98e4107725a70e993 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Thu, 19 May 2016 17:37:27 -0500 Subject: [PATCH] testsuite: add a test for explicit depgraph breakage --- Makefile.am | 3 ++- tests/lib1/depgraph-break.pc | 12 ++++++++++++ tests/run.sh.in | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 tests/lib1/depgraph-break.pc diff --git a/Makefile.am b/Makefile.am index 8435140..c7c89ea 100644 --- a/Makefile.am +++ b/Makefile.am @@ -52,7 +52,8 @@ EXTRA_DIST = \ tests/lib3/bar.pc \ tests/lib1/conflicts.pc \ tests/lib1/omg-uninstalled.pc \ - tests/lib1/isystem.pc + tests/lib1/isystem.pc \ + tests/lib1/depgraph-break.pc pkginclude_HEADERS = libpkgconf/bsdstubs.h libpkgconf/iter.h libpkgconf/libpkgconf.h libpkgconf/stdinc.h libpkgconf_la_SOURCES = \ diff --git a/tests/lib1/depgraph-break.pc b/tests/lib1/depgraph-break.pc new file mode 100644 index 0000000..61e00cc --- /dev/null +++ b/tests/lib1/depgraph-break.pc @@ -0,0 +1,12 @@ +prefix=/test +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: depgraph-break +Description: A testing pkg-config file +Version: 1.2.3 +Libs: -L${libdir} -lfoo +Cflags: -fPIC -I${includedir}/foo +Cflags.private: -DFOO_STATIC +Requires: nonexistant diff --git a/tests/run.sh.in b/tests/run.sh.in index 29435e3..4d5f166 100644 --- a/tests/run.sh.in +++ b/tests/run.sh.in @@ -250,6 +250,9 @@ run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --exists --print-errors 'foo > run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --exists --print-errors 'nonexisting foo <= 3'; echo \$?" \ '1' +run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --exists --print-errors 'depgraph-break'; echo \$?" \ + '1' + run_test "PKG_CONFIG_PATH='${selfdir}/lib2' ${1} ${selfdir}/lib3/bar.pc --cflags" \ '-fPIC -I/test/include/foo'