summaryrefslogtreecommitdiff
path: root/test/integration/test-ubuntu-bug-761175-remove-purge
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2015-08-18 11:54:05 +0200
committerMichael Vogt <mvo@debian.org>2015-08-18 11:54:05 +0200
commit21248c0f00ee71412dbadc6ebf84011cf974346d (patch)
tree7dc1f5904399482d2128765b5b86d57a4ac5b3e1 /test/integration/test-ubuntu-bug-761175-remove-purge
parente5f34ad3b043abf033c1626eb8449b75955d6760 (diff)
parent4fc6b7570c3e97b65c118b58cdf6729fa94c9b03 (diff)
Merge branch 'debian/experimental' into feature/srv-records
Conflicts: cmdline/apt-helper.cc cmdline/makefile
Diffstat (limited to 'test/integration/test-ubuntu-bug-761175-remove-purge')
-rwxr-xr-xtest/integration/test-ubuntu-bug-761175-remove-purge63
1 files changed, 42 insertions, 21 deletions
diff --git a/test/integration/test-ubuntu-bug-761175-remove-purge b/test/integration/test-ubuntu-bug-761175-remove-purge
index 14648e9b8..d5dfa2acf 100755
--- a/test/integration/test-ubuntu-bug-761175-remove-purge
+++ b/test/integration/test-ubuntu-bug-761175-remove-purge
@@ -4,33 +4,54 @@ set -e
TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
setupenvironment
-configarchitecture 'native'
-
-setupsimplenativepackage 'compiz-core' 'native' '1.0' 'unstable'
-BUILDDIR='incoming/compiz-core-1.0'
-mkdir -p ${BUILDDIR}/debian/compiz-core/etc
-echo 'foo=bar;' > ${BUILDDIR}/compiz.conf
-echo 'compiz.conf /etc/compiz.conf' >> ${BUILDDIR}/debian/install
-buildpackage "$BUILDDIR" 'unstable' 'main' 'native'
-rm -rf "$BUILDDIR"
+configarchitecture 'amd64' 'i386'
+
+buildcompizpkg() {
+ setupsimplenativepackage "compiz-core-$1" "$2" "$3" "$4"
+ BUILDDIR="incoming/compiz-core-$1-$3"
+ mkdir -p ${BUILDDIR}/debian/compiz-core/etc
+ echo 'foo=bar;' > ${BUILDDIR}/compiz.conf
+ echo 'compiz.conf /etc/compiz.conf' >> ${BUILDDIR}/debian/install
+ buildpackage "$BUILDDIR" "$4" 'main' "$2"
+ rm -rf "$BUILDDIR"
+}
+buildcompizpkg 'native' 'all' '1.0' 'stable'
+buildcompizpkg 'all' 'native' '1.0' 'stable'
+buildcompizpkg 'native' 'native' '2.0' 'unstable'
+buildcompizpkg 'all' 'all' '2.0' 'unstable'
setupaptarchive
+runtests() {
+ testdpkgnotinstalled compiz-core-$1
+ testsuccess aptget install compiz-core-$1 -t "${2:-unstable}"
+ testdpkginstalled compiz-core-$1
-testdpkgnotinstalled compiz-core
-testsuccess aptget install compiz-core
-testdpkginstalled compiz-core
-
-testsuccess aptget remove compiz-core -y
-testdpkgnotinstalled compiz-core
-
-msgtest 'Check that conffiles are still around for' 'compiz-core'
-dpkg -l compiz-core | grep -q '^rc' && msgpass || msgfail
+ testsuccess aptget remove compiz-core-$1 -y
+ testdpkgnotinstalled compiz-core-$1
+ testdpkgstatus 'rc' '1' "compiz-core-$1"
-testequal 'Reading package lists...
+ testsuccessequal "Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
- compiz-core*
+ compiz-core-$1*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
-Purg compiz-core' aptget purge compiz-core -s
+Purg compiz-core-$1" aptget purge compiz-core-$1 -s
+ testsuccess aptget purge compiz-core-$1 -y
+ echo -n '' > rootdir/var/lib/dpkg/available # dpkg -l < 1.16.2 reads the available file by default, where the package can be found
+ testequalor2 "dpkg-query: no packages found matching compiz-core-$1" "No packages found matching compiz-core-$1." dpkg -l compiz-core-$1
+}
+
+msgmsg 'Test in multi arch environment'
+runtests 'native'
+runtests 'all'
+runtests 'native' 'stable'
+runtests 'all' 'stable'
+
+msgmsg 'Test in single arch environment'
+configarchitecture 'amd64'
+runtests 'native'
+runtests 'all'
+runtests 'native' 'stable'
+runtests 'all' 'stable'