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 \
|
2022-07-26 16:45:30 +00:00
|
|
|
do_not_duplicate_sysroot_dir \
|
|
|
|
uninstalled \
|
2022-07-26 18:00:22 +00:00
|
|
|
uninstalled_pkgconf1 \
|
2022-07-26 18:05:31 +00:00
|
|
|
uninstalled_fdo \
|
|
|
|
uninstalled_fdo_pc_sysrootdir
|
2017-10-11 15:01:19 +00:00
|
|
|
|
|
|
|
do_not_eat_slash_body()
|
|
|
|
{
|
|
|
|
export PKG_CONFIG_PATH="${selfdir}/lib1"
|
|
|
|
export PKG_CONFIG_SYSROOT_DIR="/"
|
|
|
|
atf_check \
|
2023-01-21 20:22:03 +00:00
|
|
|
-o inline:"-fPIC -I/test/include/foo\n" \
|
2017-10-11 15:01:19 +00:00
|
|
|
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 \
|
2023-01-21 20:22:03 +00:00
|
|
|
-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
|
|
|
|
}
|
2022-06-26 19:34:54 +00:00
|
|
|
|
|
|
|
do_not_duplicate_sysroot_dir_body()
|
|
|
|
{
|
|
|
|
export PKG_CONFIG_PATH="${selfdir}/lib1"
|
|
|
|
export PKG_CONFIG_SYSROOT_DIR="/sysroot"
|
|
|
|
|
|
|
|
atf_check \
|
2023-01-21 20:22:03 +00:00
|
|
|
-o inline:"-I/sysroot/usr/include\n" \
|
2022-06-26 19:34:54 +00:00
|
|
|
pkgconf --cflags sysroot-dir-2
|
|
|
|
|
|
|
|
atf_check \
|
2023-01-21 20:22:03 +00:00
|
|
|
-o inline:"-I/sysroot/usr/include\n" \
|
2022-06-26 19:34:54 +00:00
|
|
|
pkgconf --cflags sysroot-dir-3
|
|
|
|
|
|
|
|
atf_check \
|
2023-01-21 20:22:03 +00:00
|
|
|
-o inline:"-I/sysroot/usr/include\n" \
|
2022-06-26 19:34:54 +00:00
|
|
|
pkgconf --cflags sysroot-dir-5
|
|
|
|
|
|
|
|
export PKG_CONFIG_SYSROOT_DIR="${SYSROOT_DIR}"
|
|
|
|
|
|
|
|
atf_check \
|
2023-01-21 20:22:03 +00:00
|
|
|
-o inline:"-I${SYSROOT_DIR}/usr/include\n" \
|
2022-06-26 19:34:54 +00:00
|
|
|
pkgconf --cflags sysroot-dir-4
|
|
|
|
}
|
2022-07-26 16:45:30 +00:00
|
|
|
|
|
|
|
uninstalled_body()
|
|
|
|
{
|
|
|
|
export PKG_CONFIG_PATH="${selfdir}/lib1"
|
|
|
|
export PKG_CONFIG_SYSROOT_DIR="/sysroot"
|
|
|
|
|
|
|
|
atf_check \
|
2023-01-21 20:22:03 +00:00
|
|
|
-o inline:"-L/test/lib -lomg\n" \
|
2022-07-26 18:00:22 +00:00
|
|
|
pkgconf --libs omg
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstalled_pkgconf1_body()
|
|
|
|
{
|
|
|
|
export PKG_CONFIG_PATH="${selfdir}/lib1"
|
|
|
|
export PKG_CONFIG_SYSROOT_DIR="/sysroot"
|
|
|
|
export PKG_CONFIG_PKGCONF1_SYSROOT_RULES="1"
|
|
|
|
|
|
|
|
atf_check \
|
2023-01-21 20:22:03 +00:00
|
|
|
-o inline:"-L/sysroot/test/lib -lomg\n" \
|
2022-07-26 16:45:30 +00:00
|
|
|
pkgconf --libs omg
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstalled_fdo_body()
|
|
|
|
{
|
|
|
|
export PKG_CONFIG_PATH="${selfdir}/lib1"
|
|
|
|
export PKG_CONFIG_SYSROOT_DIR="/sysroot"
|
|
|
|
export PKG_CONFIG_FDO_SYSROOT_RULES="1"
|
|
|
|
|
|
|
|
atf_check \
|
2023-01-21 20:22:03 +00:00
|
|
|
-o inline:"-L/test/lib -lomg\n" \
|
2022-07-26 16:45:30 +00:00
|
|
|
pkgconf --libs omg
|
|
|
|
}
|
2022-07-26 18:05:31 +00:00
|
|
|
|
|
|
|
uninstalled_fdo_pc_sysrootdir_body()
|
|
|
|
{
|
|
|
|
export PKG_CONFIG_PATH="${selfdir}/lib1"
|
|
|
|
export PKG_CONFIG_SYSROOT_DIR="/sysroot"
|
|
|
|
export PKG_CONFIG_FDO_SYSROOT_RULES="1"
|
|
|
|
|
|
|
|
atf_check \
|
2023-01-21 20:22:03 +00:00
|
|
|
-o inline:"-L/sysroot/test/lib -lomg\n" \
|
2022-07-26 18:05:31 +00:00
|
|
|
pkgconf --libs omg-sysroot
|
|
|
|
}
|