X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/e29a7a394cfd41e8bad81535e0a8c07654f34bf6..2906182db398419a9c59a928b7ae73cf7c7aa307:/test/integration/test-bug-661537-build-profiles-support diff --git a/test/integration/test-bug-661537-build-profiles-support b/test/integration/test-bug-661537-build-profiles-support index 6c850fdf9..d24484de9 100755 --- a/test/integration/test-bug-661537-build-profiles-support +++ b/test/integration/test-bug-661537-build-profiles-support @@ -1,8 +1,8 @@ #!/bin/sh set -e -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" setupenvironment configarchitecture 'amd64' 'i386' 'armel' @@ -24,7 +24,8 @@ insertsource 'unstable' 'spec-7' 'any' '1' 'Build-Depends: foo <stage1> <!notest setupaptarchive -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... +Reading package lists... Building dependency tree... The following NEW packages will be installed: bar @@ -32,7 +33,7 @@ The following NEW packages will be installed: Inst bar (1.0 unstable [all]) Conf bar (1.0 unstable [all])' aptget build-dep buildprofiles -s -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: bar foo @@ -42,7 +43,7 @@ Inst foo (1.0 unstable [all]) Conf bar (1.0 unstable [all]) Conf foo (1.0 unstable [all])' aptget build-dep buildprofiles -s -o APT::Architecture=i386 -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: bar @@ -50,7 +51,7 @@ The following NEW packages will be installed: Inst bar (1.0 unstable [all]) Conf bar (1.0 unstable [all])' aptget build-dep buildprofiles -s -o APT::Architecture=armel -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: bar @@ -59,18 +60,23 @@ Inst bar (1.0 unstable [all]) Conf bar (1.0 unstable [all])' aptget build-dep buildprofiles -s -o APT::Architecture=i386 -P stage1 KEEP='Reading package lists... +Reading package lists... Building dependency tree... The following NEW packages will be installed: foo 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Inst foo (1.0 unstable [all]) Conf foo (1.0 unstable [all])' -DROP='Reading package lists... +setdrop() { + DROP="Reading package lists... +$1 has no build depends. +Reading package lists... Building dependency tree... -0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." +} msgtest 'Check if version of installed dpkg is high enough for' 'build profiles support' -if dpkg --compare-versions "$(command dpkg-query --showformat='${Version}' --show dpkg)" 'ge' '1.17.14'; then +if dpkg --compare-versions "$(dpkg_version)" 'ge' '1.17.14'; then msgpass testwithdpkg() { msgtest "Test with" "dpkg-checkbuilddeps -d '$1' -P '$2'" @@ -111,36 +117,44 @@ testprofile() { testwithdpkg "$2" "$3" "$4" } +testsuccess aptcache gencaches +setdrop 'spec-1' testprofile 'spec-1' 'foo <!stage1>' '' "$KEEP" testprofile 'spec-1' 'foo <!stage1>' 'stage1' "$DROP" testprofile 'spec-1' 'foo <!stage1>' 'notest' "$KEEP" testprofile 'spec-1' 'foo <!stage1>' 'stage1,notest' "$DROP" +setdrop 'spec-2' testprofile 'spec-2' 'foo <stage1>' '' "$DROP" testprofile 'spec-2' 'foo <stage1>' 'stage1' "$KEEP" testprofile 'spec-2' 'foo <stage1>' 'notest' "$DROP" testprofile 'spec-2' 'foo <stage1>' 'stage1,notest' "$KEEP" +setdrop 'spec-3' testprofile 'spec-3' 'foo <!stage1 !notest>' '' "$KEEP" testprofile 'spec-3' 'foo <!stage1 !notest>' 'stage1' "$DROP" testprofile 'spec-3' 'foo <!stage1 !notest>' 'notest' "$DROP" testprofile 'spec-3' 'foo <!stage1 !notest>' 'stage1,notest' "$DROP" +setdrop 'spec-4' testprofile 'spec-4' 'foo <stage1 notest>' '' "$DROP" testprofile 'spec-4' 'foo <stage1 notest>' 'stage1' "$DROP" testprofile 'spec-4' 'foo <stage1 notest>' 'notest' "$DROP" testprofile 'spec-4' 'foo <stage1 notest>' 'stage1,notest' "$KEEP" +setdrop 'spec-5' testprofile 'spec-5' 'foo <!stage1 notest>' '' "$DROP" testprofile 'spec-5' 'foo <!stage1 notest>' 'stage1' "$DROP" testprofile 'spec-5' 'foo <!stage1 notest>' 'notest' "$KEEP" testprofile 'spec-5' 'foo <!stage1 notest>' 'stage1,notest' "$DROP" +setdrop 'spec-6' testprofile 'spec-6' 'foo <stage1 !notest>' '' "$DROP" testprofile 'spec-6' 'foo <stage1 !notest>' 'stage1' "$KEEP" testprofile 'spec-6' 'foo <stage1 !notest>' 'notest' "$DROP" testprofile 'spec-6' 'foo <stage1 !notest>' 'stage1,notest' "$DROP" +setdrop 'spec-7' testprofile 'spec-7' 'foo <stage1> <!notest>' '' "$KEEP" testprofile 'spec-7' 'foo <stage1> <!notest>' 'stage1' "$KEEP" testprofile 'spec-7' 'foo <stage1> <!notest>' 'notest' "$DROP"