pkgconf/tests/sysroot.sh

39 lines
791 B
Bash
Raw Normal View History

2016-09-18 20:48:13 +00:00
#!/usr/bin/env atf-sh
. $(atf_get_srcdir)/test_env.sh
tests_init \
cflags \
2017-10-11 15:01:19 +00:00
variable \
do_not_eat_slash \
do_not_eat_slash_body()
{
export PKG_CONFIG_PATH="${selfdir}/lib1"
export PKG_CONFIG_SYSROOT_DIR="/"
atf_check \
-o inline:"-fPIC -I/test/include/foo \n" \
pkgconf --cflags baz
}
2016-09-18 20:48:13 +00:00
cflags_body()
{
export PKG_CONFIG_PATH="${selfdir}/lib1"
export PKG_CONFIG_SYSROOT_DIR="${SYSROOT_DIR}"
atf_check \
-o inline:"-fPIC -I${SYSROOT_DIR}/test/include/foo \n" \
2016-09-18 20:48:13 +00:00
pkgconf --cflags baz
}
variable_body()
{
export PKG_CONFIG_PATH="${selfdir}/lib1"
export PKG_CONFIG_SYSROOT_DIR="${SYSROOT_DIR}"
atf_check \
-o inline:"${SYSROOT_DIR}/test\n" \
pkgconf --variable=prefix foo
atf_check \
-o inline:"${SYSROOT_DIR}/test/include\n" \
pkgconf --variable=includedir foo
}