tests: sysroot: add additional tests

pull/241/head
Ariadne Conill 2022-06-26 19:34:54 +00:00
parent 9950312fde
commit 7fa632a658
1 changed files with 25 additions and 0 deletions

View File

@ -6,6 +6,7 @@ tests_init \
cflags \ cflags \
variable \ variable \
do_not_eat_slash \ do_not_eat_slash \
do_not_duplicate_sysroot_dir
do_not_eat_slash_body() do_not_eat_slash_body()
{ {
@ -36,3 +37,27 @@ variable_body()
-o inline:"${SYSROOT_DIR}/test/include\n" \ -o inline:"${SYSROOT_DIR}/test/include\n" \
pkgconf --variable=includedir foo 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
}