mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-05-18 02:08:08 +02:00
Always use --static test results for indirect depencency results
Often the expected results for the indirect dependency tests fell behind because it's not a typical test scenario. However, since the results are always the same as --static, they can just use the same results and the test can be run conditionally without --static based on configuration.
This commit is contained in:
parent
840cf3c97e
commit
d6337ec986
4 changed files with 31 additions and 25 deletions
|
|
@ -4,12 +4,16 @@ set -e
|
|||
|
||||
. ${srcdir}/common
|
||||
|
||||
if [ "$list_indirect_deps" = "yes" ]; then
|
||||
RESULT="-lsimple -lm"
|
||||
else
|
||||
RESULT="-lsimple"
|
||||
RESULT="-lsimple"
|
||||
if [ "$list_indirect_deps" = no ]; then
|
||||
run_test --libs simple
|
||||
fi
|
||||
run_test --libs simple
|
||||
|
||||
RESULT="-lsimple -lm"
|
||||
if [ "$list_indirect_deps" = yes ]; then
|
||||
run_test --libs simple
|
||||
fi
|
||||
run_test --libs --static simple
|
||||
|
||||
RESULT=""
|
||||
run_test --libs fields-blank
|
||||
|
|
|
|||
|
|
@ -22,21 +22,18 @@ RESULT=""
|
|||
run_test --exists missing-requires-private
|
||||
|
||||
# get Libs
|
||||
if [ "$list_indirect_deps" = "yes" ]; then
|
||||
EXPECT_RETURN=1
|
||||
RESULT='Package pkg-non-existent-private-dep was not found in the pkg-config search path.
|
||||
Perhaps you should add the directory containing `pkg-non-existent-private-dep.pc'\''
|
||||
to the PKG_CONFIG_PATH environment variable
|
||||
Package '\''pkg-non-existent-private-dep'\'', required by '\''Missing Requires.private test package'\'', not found'
|
||||
else
|
||||
EXPECT_RETURN=0
|
||||
RESULT="-L/missing-requires-private/lib -lmissing-requires-private"
|
||||
EXPECT_RETURN=0
|
||||
RESULT="-L/missing-requires-private/lib -lmissing-requires-private"
|
||||
if [ "$list_indirect_deps" = no ]; then
|
||||
run_test --libs missing-requires-private
|
||||
fi
|
||||
run_test --libs missing-requires-private
|
||||
|
||||
# Libs.private should fail (verbosely, but the output isn't verified)
|
||||
EXPECT_RETURN=1
|
||||
RESULT=""
|
||||
if [ "$list_indirect_deps" = yes ]; then
|
||||
run_test --silence-errors --libs missing-requires-private
|
||||
fi
|
||||
run_test --silence-errors --static --libs missing-requires-private
|
||||
|
||||
# Cflags.private should fail (verbosely, but the output isn't verified)
|
||||
|
|
|
|||
|
|
@ -13,13 +13,14 @@ RESULT="-I/requires-test/include -I/public-dep/include -I/private-dep/include"
|
|||
run_test --static --cflags requires-test
|
||||
|
||||
# expect libs for just requires-test and public-dep
|
||||
if [ "$list_indirect_deps" = "yes" ]; then
|
||||
RESULT="-L/requires-test/lib -L/public-dep/lib -L/private-dep/lib -lrequires-test -lpublic-dep -lprivate-dep"
|
||||
else
|
||||
RESULT="-L/requires-test/lib -L/public-dep/lib -lrequires-test -lpublic-dep"
|
||||
RESULT="-L/requires-test/lib -L/public-dep/lib -lrequires-test -lpublic-dep"
|
||||
if [ "$list_indirect_deps" = no ]; then
|
||||
run_test --libs requires-test
|
||||
fi
|
||||
run_test --libs requires-test
|
||||
|
||||
# expect libs for requires-test, public-dep and private-dep in static case
|
||||
RESULT="-L/requires-test/lib -L/public-dep/lib -L/private-dep/lib -lrequires-test -lpublic-dep -lprivate-dep"
|
||||
if [ "$list_indirect_deps" = yes ]; then
|
||||
run_test --libs requires-test
|
||||
fi
|
||||
run_test --static --libs requires-test
|
||||
|
|
|
|||
|
|
@ -9,12 +9,16 @@ export PKG_CONFIG_SYSROOT_DIR=/sysroot
|
|||
RESULT=""
|
||||
run_test --cflags simple
|
||||
|
||||
if [ "$list_indirect_deps" = "yes" ]; then
|
||||
RESULT="-lsimple -lm"
|
||||
else
|
||||
RESULT="-lsimple"
|
||||
RESULT="-lsimple"
|
||||
if [ "$list_indirect_deps" = no ]; then
|
||||
run_test --libs simple
|
||||
fi
|
||||
run_test --libs simple
|
||||
|
||||
RESULT="-lsimple -lm"
|
||||
if [ "$list_indirect_deps" = yes ]; then
|
||||
run_test --libs simple
|
||||
fi
|
||||
run_test --libs --static simple
|
||||
|
||||
RESULT="-I/sysroot/public-dep/include"
|
||||
run_test --cflags public-dep
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue