From 52b58ce5f59b382119bd441791a3dd07df5b43d5 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 30 Dec 2016 20:25:02 -0600 Subject: [PATCH] tests: regress: add another test case for -idirafter ordering (noticed on pkg-config bugzilla) --- Makefile.am | 1 + tests/lib1/idirafter-ordering.pc | 4 ++++ tests/regress.sh | 9 +++++++++ 3 files changed, 14 insertions(+) create mode 100644 tests/lib1/idirafter-ordering.pc diff --git a/Makefile.am b/Makefile.am index c81e69f..7a62922 100644 --- a/Makefile.am +++ b/Makefile.am @@ -55,6 +55,7 @@ EXTRA_DIST = pkg.m4 \ tests/lib1/omg-uninstalled.pc \ tests/lib1/isystem.pc \ tests/lib1/idirafter.pc \ + tests/lib1/idirafter-ordering.pc \ tests/lib1/depgraph-break.pc \ tests/lib1/cflags-whitespace.pc \ tests/lib1/cflags-whitespace-trailing.pc \ diff --git a/tests/lib1/idirafter-ordering.pc b/tests/lib1/idirafter-ordering.pc new file mode 100644 index 0000000..c42f702 --- /dev/null +++ b/tests/lib1/idirafter-ordering.pc @@ -0,0 +1,4 @@ +Name: Bad +Description: Demonstrates problems with -idirafter in old pkg-config; see also https://bugs.freedesktop.org/show_bug.cgi?id=23480 +Version: 1 +Cflags: -I/opt/bad/include1 -idirafter -I/opt/bad/include2 -I/opt/bad/include3 diff --git a/tests/regress.sh b/tests/regress.sh index 99b13de..129b968 100755 --- a/tests/regress.sh +++ b/tests/regress.sh @@ -21,6 +21,7 @@ tests_init \ isystem_munge_sysroot \ idirafter_munge_order \ idirafter_munge_sysroot \ + idirafter_ordering \ pcpath \ sysroot_munge @@ -170,6 +171,14 @@ idirafter_munge_sysroot_body() pkgconf --cflags idirafter } +idirafter_ordering_body() +{ + export PKG_CONFIG_PATH="${selfdir}/lib1" + atf_check \ + -o inline:"-I/opt/bad/include1 -idirafter -I/opt/bad/include2 -I/opt/bad/include3 \n" \ + pkgconf --cflags idirafter-ordering +} + pcpath_body() { export PKG_CONFIG_PATH="${selfdir}/lib2"