From 63a61b7c9fa05c3228a4829b0b858c166d6fca57 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 4 Nov 2016 23:30:21 -0500 Subject: [PATCH] testsuite: regress: really add the last few tests this time --- tests/regress.sh | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/tests/regress.sh b/tests/regress.sh index 261383f..542f18d 100755 --- a/tests/regress.sh +++ b/tests/regress.sh @@ -7,16 +7,20 @@ tests_init \ depgraph_break_1 \ depgraph_break_2 \ depgraph_break_3 \ + define_variable \ variable \ keep_system_libs \ libs \ libs_only \ + libs_never_mergeback \ cflags_only \ + cflags_never_mergeback \ incomplete_libs \ incomplete_cflags \ isystem_munge_order \ isystem_munge_sysroot \ - pcpath + pcpath \ + sysroot_munge case_sensitivity_body() { @@ -50,6 +54,13 @@ depgraph_break_3_body() pkgconf --exists --print-errors 'depgraph-break' } +define_variable_body() +{ + export PKG_CONFIG_PATH="${selfdir}/lib1" + atf_check -o inline:"\\\${libdir}/typelibdir\n" \ + pkgconf --variable=typelibdir --define-variable='libdir=\${libdir}' typelibdir +} + variable_body() { export PKG_CONFIG_PATH="${selfdir}/lib1" @@ -82,6 +93,17 @@ libs_only_body() pkgconf --libs-only-L --libs-only-l cflags-libs-only } +libs_never_mergeback_body() +{ + export PKG_CONFIG_PATH="${selfdir}/lib1" + atf_check \ + -o inline:"-L/test/bar/lib -lfoo1 \n" \ + pkgconf --libs prefix-foo1 + atf_check \ + -o inline:"-L/test/bar/lib -lfoo1 -lfoo2 \n" \ + pkgconf --libs prefix-foo1 prefix-foo2 +} + cflags_only_body() { export PKG_CONFIG_PATH="${selfdir}/lib1" @@ -90,6 +112,14 @@ cflags_only_body() pkgconf --cflags-only-I --cflags-only-other cflags-libs-only } +cflags_never_mergeback_body() +{ + export PKG_CONFIG_PATH="${selfdir}/lib1" + atf_check \ + -o inline:"-I/test/bar/include/foo -DBAR -fPIC -DFOO \n" \ + pkgconf --cflags prefix-foo1 prefix-foo2 +} + incomplete_libs_body() { export PKG_CONFIG_PATH="${selfdir}/lib1" @@ -129,3 +159,16 @@ pcpath_body() -o inline:"-fPIC -I/test/include/foo \n" \ pkgconf --cflags ${selfdir}/lib3/bar.pc } + +sysroot_munge_body() +{ + export PKG_CONFIG_PATH="${selfdir}/lib1" PKG_CONFIG_SYSROOT_DIR="/sysroot" + atf_check \ + -o inline:"-L/sysroot/lib -lfoo \n" \ + pkgconf --libs sysroot-dir + + export PKG_CONFIG_SYSROOT_DIR="/sysroot2" + atf_check \ + -o inline:"-L/sysroot2/sysroot/lib -lfoo \n" \ + pkgconf --libs sysroot-dir +}