pkgconf/tests/regress.sh
Ariadne Conill 192bc8c923 tests: move relevant query building regress tests out of kyua
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2026-01-18 19:47:09 -08:00

25 lines
609 B
Bash
Executable File

#!/usr/bin/env atf-sh
. $(atf_get_srcdir)/test_env.sh
tests_init \
explicit_sysroot
# sysroot_munge \
sysroot_munge_body()
{
sed "s|/sysroot/|${selfdir}/|g" ${selfdir}/lib1/sysroot-dir.pc > ${selfdir}/lib1/sysroot-dir-selfdir.pc
export PKG_CONFIG_PATH="${selfdir}/lib1" PKG_CONFIG_SYSROOT_DIR="${selfdir}"
atf_check \
-o inline:"-L${selfdir}/lib -lfoo\n" \
pkgconf --libs sysroot-dir-selfdir
}
explicit_sysroot_body()
{
export PKG_CONFIG_SYSROOT_DIR=${selfdir}
atf_check -o inline:"${selfdir}/usr/share/test\n" \
pkgconf --with-path="${selfdir}/lib1" --variable=pkgdatadir explicit-sysroot
}