From 24e0462c3e1dd849c9cca9e227b3b3bc82d300f5 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 16 Jul 2017 17:33:42 -0500 Subject: [PATCH] tests: add test for github #123 --- Makefile.am | 1 + tests/lib1/explicit-sysroot.pc | 7 +++++++ tests/regress.sh | 10 +++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 tests/lib1/explicit-sysroot.pc diff --git a/Makefile.am b/Makefile.am index 90acd5b..77d05f7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -77,6 +77,7 @@ EXTRA_DIST = pkg.m4 \ tests/lib1/fragment-quoting-6.pc \ tests/lib1/fragment-quoting-7.pc \ tests/lib1/malformed-1.pc \ + tests/lib1/explicit-sysroot.pc \ tests/test_env.sh \ $(test_scripts) \ doc/conf.py \ diff --git a/tests/lib1/explicit-sysroot.pc b/tests/lib1/explicit-sysroot.pc new file mode 100644 index 0000000..63c7ca0 --- /dev/null +++ b/tests/lib1/explicit-sysroot.pc @@ -0,0 +1,7 @@ +prefix=/usr +datarootdir=${prefix}/share +pkgdatadir=${pc_sysrootdir}/${datarootdir}/test + +Name: Test +Description: Testing pc_sysrootdir auto-expansion +Version: 1.0 diff --git a/tests/regress.sh b/tests/regress.sh index e53b42e..6b7a34e 100755 --- a/tests/regress.sh +++ b/tests/regress.sh @@ -26,7 +26,8 @@ tests_init \ sysroot_munge \ virtual_variable \ fragment_collision \ - malformed_1 + malformed_1 \ + explicit_sysroot case_sensitivity_body() { @@ -231,3 +232,10 @@ malformed_1_body() atf_check -s exit:1 -o ignore \ pkgconf --validate --with-path="${selfdir}/lib1" malformed-1 } + +explicit_sysroot_body() +{ + export PKG_CONFIG_SYSROOT_DIR=/sysroot + atf_check -o inline:"/sysroot/usr/share/test\n" \ + pkgconf --with-path="${selfdir}/lib1" --variable=pkgdatadir explicit-sysroot +}