From 7fa632a6582014cf98d1e198a3ba735b26f38161 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Sun, 26 Jun 2022 19:34:54 +0000 Subject: [PATCH] tests: sysroot: add additional tests --- tests/sysroot.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/sysroot.sh b/tests/sysroot.sh index ec2e0bb..4171971 100755 --- a/tests/sysroot.sh +++ b/tests/sysroot.sh @@ -6,6 +6,7 @@ tests_init \ cflags \ variable \ do_not_eat_slash \ + do_not_duplicate_sysroot_dir do_not_eat_slash_body() { @@ -36,3 +37,27 @@ variable_body() -o inline:"${SYSROOT_DIR}/test/include\n" \ pkgconf --variable=includedir foo } + +do_not_duplicate_sysroot_dir_body() +{ + export PKG_CONFIG_PATH="${selfdir}/lib1" + export PKG_CONFIG_SYSROOT_DIR="/sysroot" + + atf_check \ + -o inline:"-I/sysroot/usr/include \n" \ + pkgconf --cflags sysroot-dir-2 + + atf_check \ + -o inline:"-I/sysroot/usr/include \n" \ + pkgconf --cflags sysroot-dir-3 + + atf_check \ + -o inline:"-I/sysroot/usr/include \n" \ + pkgconf --cflags sysroot-dir-5 + + export PKG_CONFIG_SYSROOT_DIR="${SYSROOT_DIR}" + + atf_check \ + -o inline:"-I${SYSROOT_DIR}/usr/include \n" \ + pkgconf --cflags sysroot-dir-4 +}