summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2012-11-28 09:51:01 -0800
committerDan Nicholson <dbn.lists@gmail.com>2012-11-29 19:18:41 -0800
commitd6337ec9861f9f32d484159014f921e97fbcb264 (patch)
treee87f34f80d6831ccd95c2d733df696a09a557e75
parent840cf3c97e793877388396a43dd2048f361eac67 (diff)
downloadpkg-config-d6337ec9861f9f32d484159014f921e97fbcb264.tar.gz
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.
-rwxr-xr-xcheck/check-libs14
-rwxr-xr-xcheck/check-missing17
-rwxr-xr-xcheck/check-requires-private11
-rwxr-xr-xcheck/check-sysroot14
4 files changed, 31 insertions, 25 deletions
diff --git a/check/check-libs b/check/check-libs
index c453b2a..b85dc29 100755
--- a/check/check-libs
+++ b/check/check-libs
@@ -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
diff --git a/check/check-missing b/check/check-missing
index ef808e0..719998a 100755
--- a/check/check-missing
+++ b/check/check-missing
@@ -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)
diff --git a/check/check-requires-private b/check/check-requires-private
index c782d5f..6924188 100755
--- a/check/check-requires-private
+++ b/check/check-requires-private
@@ -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
diff --git a/check/check-sysroot b/check/check-sysroot
index b14a025..0820206 100755
--- a/check/check-sysroot
+++ b/check/check-sysroot
@@ -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