2009-03-30 20:40:53 +02:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
2012-08-19 07:31:58 -07:00
|
|
|
set -e
|
|
|
|
|
|
2009-03-30 20:40:53 +02:00
|
|
|
. ${srcdir}/common
|
|
|
|
|
|
|
|
|
|
# non-existent package; call should fail and cause no output
|
|
|
|
|
EXPECT_RETURN=1
|
|
|
|
|
RESULT=""
|
2012-09-29 08:50:57 -07:00
|
|
|
run_test --exists pkg-non-existent
|
2012-06-07 05:47:45 -07:00
|
|
|
|
|
|
|
|
# existing package, but with missing Requires
|
2012-06-07 05:51:59 -07:00
|
|
|
EXPECT_RETURN=1
|
2012-06-07 05:47:45 -07:00
|
|
|
RESULT=""
|
2012-09-29 08:50:57 -07:00
|
|
|
run_test --exists missing-requires
|
2009-03-30 20:40:53 +02:00
|
|
|
|
|
|
|
|
# tests below are on an existing package, but with missing Requires.private;
|
|
|
|
|
# when pkg-config outputs error, the actual error text isn't checked
|
2012-06-07 05:51:59 -07:00
|
|
|
# package exists, but should fail since deps can't be resolved
|
|
|
|
|
EXPECT_RETURN=1
|
2009-03-30 20:40:53 +02:00
|
|
|
RESULT=""
|
2012-09-29 08:50:57 -07:00
|
|
|
run_test --exists missing-requires-private
|
2009-03-30 20:40:53 +02:00
|
|
|
|
|
|
|
|
# get Libs
|
2012-11-28 09:51:01 -08:00
|
|
|
EXPECT_RETURN=0
|
|
|
|
|
RESULT="-L/missing-requires-private/lib -lmissing-requires-private"
|
|
|
|
|
if [ "$list_indirect_deps" = no ]; then
|
|
|
|
|
run_test --libs missing-requires-private
|
2009-03-30 22:03:38 +02:00
|
|
|
fi
|
2009-03-30 20:40:53 +02:00
|
|
|
|
|
|
|
|
# Libs.private should fail (verbosely, but the output isn't verified)
|
|
|
|
|
EXPECT_RETURN=1
|
|
|
|
|
RESULT=""
|
2012-11-28 09:51:01 -08:00
|
|
|
if [ "$list_indirect_deps" = yes ]; then
|
|
|
|
|
run_test --silence-errors --libs missing-requires-private
|
|
|
|
|
fi
|
2012-09-29 08:50:57 -07:00
|
|
|
run_test --silence-errors --static --libs missing-requires-private
|
2009-03-30 20:40:53 +02:00
|
|
|
|
|
|
|
|
# Cflags.private should fail (verbosely, but the output isn't verified)
|
|
|
|
|
EXPECT_RETURN=1
|
|
|
|
|
RESULT=""
|
2012-09-29 08:50:57 -07:00
|
|
|
run_test --silence-errors --static --cflags missing-requires-private
|
2009-03-30 20:40:53 +02:00
|
|
|
|
|
|
|
|
# Cflags should fail (verbosely, but the output isn't verified)
|
|
|
|
|
EXPECT_RETURN=1
|
|
|
|
|
RESULT=""
|
2012-09-29 08:50:57 -07:00
|
|
|
run_test --silence-errors --cflags missing-requires-private
|
2009-03-30 20:40:53 +02:00
|
|
|
|
|
|
|
|
# get includedir var
|
|
|
|
|
EXPECT_RETURN=0
|
|
|
|
|
RESULT="/usr/include/somedir"
|
2012-09-29 08:50:57 -07:00
|
|
|
run_test --variable includedir missing-requires-private
|
2009-03-30 20:49:17 +02:00
|
|
|
|
2012-12-11 10:04:21 -08:00
|
|
|
# tests below are on an existing package, but with missing Requires;
|
|
|
|
|
# when pkg-config outputs error, the actual error text isn't checked
|
2009-03-30 20:49:17 +02:00
|
|
|
# package exists
|
2012-12-11 10:04:21 -08:00
|
|
|
EXPECT_RETURN=1
|
2009-03-30 20:49:17 +02:00
|
|
|
RESULT=""
|
2012-09-29 08:50:57 -07:00
|
|
|
run_test missing-requires
|
2009-03-30 20:49:17 +02:00
|
|
|
|
|
|
|
|
# Libs should fail
|
|
|
|
|
EXPECT_RETURN=1
|
|
|
|
|
RESULT=""
|
2012-09-29 08:50:57 -07:00
|
|
|
run_test --silence-errors --libs missing-requires
|
2009-03-30 20:49:17 +02:00
|
|
|
|
|
|
|
|
# Cflags should fail
|
|
|
|
|
EXPECT_RETURN=1
|
|
|
|
|
RESULT=""
|
2012-09-29 08:50:57 -07:00
|
|
|
run_test --silence-errors --cflags missing-requires
|
2009-03-30 20:49:17 +02:00
|
|
|
|
|
|
|
|
# get includedir var
|
|
|
|
|
EXPECT_RETURN=0
|
|
|
|
|
RESULT="/usr/include/somedir"
|
2012-09-29 08:50:57 -07:00
|
|
|
run_test --variable includedir missing-requires
|