tests: move cflags ordering tests out of kyua

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
This commit is contained in:
Ariadne Conill 2026-01-18 19:28:52 -08:00
parent c8018139cc
commit 52c2b0c2cb
4 changed files with 10 additions and 18 deletions

View File

@ -71,6 +71,8 @@ EXTRA_DIST = pkg.m4 \
t/basic/variable-env.test \
t/basic/variable-no-recursion.test \
t/basic/variable.test \
t/ordering/cflags-never-mergeback.test \
t/ordering/cflags-only.test \
t/ordering/flag-order-1.test \
t/ordering/flag-order-2.test \
t/ordering/flag-order-3.test \

View File

@ -0,0 +1,4 @@
PackageSearchPath: lib1
WantedFlags: cflags
Query: prefix-foo1 prefix-foo2
ExpectedStdout: -I/test/bar/include/foo -DBAR -fPIC -DFOO

View File

@ -0,0 +1,4 @@
PackageSearchPath: lib1
Query: cflags-libs-only
WantedFlags: cflags-only-i cflags-only-other
ExpectedStdout: -I/test/local/include/foo

View File

@ -6,8 +6,6 @@ tests_init \
libs \
libs_only \
libs_never_mergeback \
cflags_only \
cflags_never_mergeback \
modversion_one_word_expression \
modversion_two_word_expression \
modversion_three_word_expression \
@ -44,22 +42,6 @@ libs_never_mergeback_body()
pkgconf --libs prefix-foo1 prefix-foo2
}
cflags_only_body()
{
export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \
-o inline:"-I/test/local/include/foo\n" \
pkgconf --cflags-only-I --cflags-only-other cflags-libs-only
}
cflags_never_mergeback_body()
{
export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \
-o inline:"-I/test/bar/include/foo -DBAR -fPIC -DFOO\n" \
pkgconf --cflags prefix-foo1 prefix-foo2
}
sysroot_munge_body()
{
sed "s|/sysroot/|${selfdir}/|g" ${selfdir}/lib1/sysroot-dir.pc > ${selfdir}/lib1/sysroot-dir-selfdir.pc