summaryrefslogtreecommitdiff
path: root/check/check-missing
blob: ef808e069feb379b684771a8b4c9dae793f77e9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#! /bin/sh

set -e

. ${srcdir}/common

# non-existent package; call should fail and cause no output
EXPECT_RETURN=1
RESULT=""
run_test --exists pkg-non-existent

# existing package, but with missing Requires
EXPECT_RETURN=1
RESULT=""
run_test --exists missing-requires

# tests below are on an existing package, but with missing Requires.private;
# when pkg-config outputs error, the actual error text isn't checked
# package exists, but should fail since deps can't be resolved
EXPECT_RETURN=1
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"
fi
run_test --libs missing-requires-private

# Libs.private should fail (verbosely, but the output isn't verified)
EXPECT_RETURN=1
RESULT=""
run_test --silence-errors --static --libs missing-requires-private

# Cflags.private should fail (verbosely, but the output isn't verified)
EXPECT_RETURN=1
RESULT=""
run_test --silence-errors --static --cflags missing-requires-private

# Cflags should fail (verbosely, but the output isn't verified)
EXPECT_RETURN=1
RESULT=""
run_test --silence-errors --cflags missing-requires-private

# get includedir var
EXPECT_RETURN=0
RESULT="/usr/include/somedir"
run_test --variable includedir missing-requires-private

# tests below are on an existing package, but with missing Requires; when
# pkg-config outputs error, the actual error text isn't checked
# package exists
EXPECT_RETURN=0
RESULT=""
run_test missing-requires

# Libs should fail
EXPECT_RETURN=1
RESULT=""
run_test --silence-errors --libs missing-requires

# Cflags should fail
EXPECT_RETURN=1
RESULT=""
run_test --silence-errors --cflags missing-requires

# get includedir var
EXPECT_RETURN=0
RESULT="/usr/include/somedir"
run_test --variable includedir missing-requires