]>
git.saurik.com Git - apt.git/blob - test/integration/test-bug-661537-build-profiles-support
4 TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
'amd64' 'i386' 'armel'
9 insertinstalledpackage
'build-essential' 'all' '0' 'Multi-Arch: foreign'
11 insertpackage
'unstable' 'foo' 'all' '1.0'
12 insertpackage
'unstable' 'bar' 'all' '1.0'
14 insertsource
'unstable' 'buildprofiles' 'any' '1' 'Build-Depends: foo (>= 1.0) [i386 arm] <!profile.stage1 !profile.cross>, bar'
16 # table from https://wiki.debian.org/BuildProfileSpec
17 insertsource
'unstable' 'spec-1' 'any' '1' 'Build-Depends: foo <!profile.stage1>'
18 insertsource
'unstable' 'spec-2' 'any' '1' 'Build-Depends: foo <profile.stage1>'
19 insertsource
'unstable' 'spec-3' 'any' '1' 'Build-Depends: foo <!profile.stage1 !profile.notest>'
20 insertsource
'unstable' 'spec-4' 'any' '1' 'Build-Depends: foo <profile.stage1 profile.notest>'
21 insertsource
'unstable' 'spec-5' 'any' '1' 'Build-Depends: foo <!profile.stage1 profile.notest>'
22 insertsource
'unstable' 'spec-6' 'any' '1' 'Build-Depends: foo <profile.stage1 !profile.notest>'
23 # multiple stanzas not supported: error out
24 insertsource
'unstable' 'spec-7' 'any' '1' 'Build-Depends: foo <profile.stage1><!profile.notest>'
25 insertsource
'unstable' 'spec-8' 'any' '1' 'Build-Depends: foo <profile.stage1> <!profile.notest>'
29 testequal
'Reading package lists...
30 Building dependency tree...
31 The following NEW packages will be installed:
33 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
34 Inst bar (1.0 unstable [all])
35 Conf bar (1.0 unstable [all])' aptget build
-dep buildprofiles
-s
37 testequal
'Reading package lists...
38 Building dependency tree...
39 The following NEW packages will be installed:
41 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
42 Inst bar (1.0 unstable [all])
43 Inst foo (1.0 unstable [all])
44 Conf bar (1.0 unstable [all])
45 Conf foo (1.0 unstable [all])' aptget build
-dep buildprofiles
-s -o APT
::Architecture
=i386
47 testequal
'Reading package lists...
48 Building dependency tree...
49 The following NEW packages will be installed:
51 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
52 Inst bar (1.0 unstable [all])
53 Conf bar (1.0 unstable [all])' aptget build
-dep buildprofiles
-s -o APT
::Architecture
=armel
55 testequal
'Reading package lists...
56 Building dependency tree...
57 The following NEW packages will be installed:
59 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
60 Inst bar (1.0 unstable [all])
61 Conf bar (1.0 unstable [all])' aptget build
-dep buildprofiles
-s -o APT
::Architecture
=i386
-P stage1
63 KEEP
='Reading package lists...
64 Building dependency tree...
65 The following NEW packages will be installed:
67 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
68 Inst foo (1.0 unstable [all])
69 Conf foo (1.0 unstable [all])'
70 DROP
='Reading package lists...
71 Building dependency tree...
72 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.'
74 msgtest
'Check if version of installed dpkg is high enough for' 'build profiles support'
75 if dpkg
--compare-versions "$(command dpkg-query --showformat='${Version}' --show dpkg)" 'ge' '1.17.2'; then
78 msgtest
"Test with" "dpkg-checkbuilddeps -d '$1' -P '$2'"
79 local OUTPUT
="${TMPWORKINGDIRECTORY}/rootdir/tmp/testwithdpkg.output"
80 if dpkgcheckbuilddeps
-d "$1" -P "$2" /dev
/null
>$OUTPUT 2>&1; then
81 if [ "$3" = "$DROP" ]; then
88 if [ "$3" = "$KEEP" ]; then
99 msgtest
"Test with" "dpkg-checkbuilddeps -d '$1' -P '$2'"
106 testequal
"$4" aptget build
-dep "$1" -s -P "$3"
107 export DEB_BUILD_PROFILES
="$(echo "$3" | tr ',' ' ')"
108 testequal
"$4" aptget build
-dep "$1" -s -o with
::environment
=1
109 unset DEB_BUILD_PROFILES
111 testequal
"$4" aptget build
-dep "$1" -s
113 testwithdpkg
"$2" "$3" "$4"
116 testprofile
'spec-1' 'foo <!profile.stage1>' '' "$KEEP"
117 testprofile
'spec-1' 'foo <!profile.stage1>' 'stage1' "$DROP"
118 testprofile
'spec-1' 'foo <!profile.stage1>' 'notest' "$KEEP"
119 testprofile
'spec-1' 'foo <!profile.stage1>' 'stage1,notest' "$DROP"
121 testprofile
'spec-2' 'foo <profile.stage1>' '' "$DROP"
122 testprofile
'spec-2' 'foo <profile.stage1>' 'stage1' "$KEEP"
123 testprofile
'spec-2' 'foo <profile.stage1>' 'notest' "$DROP"
124 testprofile
'spec-2' 'foo <profile.stage1>' 'stage1,notest' "$KEEP"
126 testprofile
'spec-3' 'foo <!profile.stage1 !profile.notest>' '' "$KEEP"
127 testprofile
'spec-3' 'foo <!profile.stage1 !profile.notest>' 'stage1' "$DROP"
128 testprofile
'spec-3' 'foo <!profile.stage1 !profile.notest>' 'notest' "$DROP"
129 testprofile
'spec-3' 'foo <!profile.stage1 !profile.notest>' 'stage1,notest' "$DROP"
131 testprofile
'spec-4' 'foo <profile.stage1 profile.notest>' '' "$DROP"
132 testprofile
'spec-4' 'foo <profile.stage1 profile.notest>' 'stage1' "$KEEP"
133 testprofile
'spec-4' 'foo <profile.stage1 profile.notest>' 'notest' "$KEEP"
134 testprofile
'spec-4' 'foo <profile.stage1 profile.notest>' 'stage1,notest' "$KEEP"
136 testprofile
'spec-5' 'foo <!profile.stage1 profile.notest>' '' "$KEEP"
137 testprofile
'spec-5' 'foo <!profile.stage1 profile.notest>' 'stage1' "$DROP"
138 testprofile
'spec-5' 'foo <!profile.stage1 profile.notest>' 'notest' "$KEEP"
139 testprofile
'spec-5' 'foo <!profile.stage1 profile.notest>' 'stage1,notest' "$DROP"
141 testprofile
'spec-6' 'foo <profile.stage1 !profile.notest>' '' "$KEEP"
142 testprofile
'spec-6' 'foo <profile.stage1 !profile.notest>' 'stage1' "$KEEP"
143 testprofile
'spec-6' 'foo <profile.stage1 !profile.notest>' 'notest' "$DROP"
144 testprofile
'spec-6' 'foo <profile.stage1 !profile.notest>' 'stage1,notest' "$KEEP"
146 testfailure aptget build
-dep spec
-7 -s
147 testfailure aptget build
-dep spec
-8 -s