summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-12-01 05:34:25 +0100
committerDan McGee <dan@archlinux.org>2011-12-01 05:34:25 +0100
commit1d98c6347c9622d4334f80fc59623da524b4f37b (patch)
treeca1284032ee13c73a625f6261ac2bde2bfbc708e /test
parent86b5b7aa4215b7408ccf1ec8368988af327703fb (diff)
parent5490cd6eb22752d2eac5410152d239c50224dbc1 (diff)
downloadpacman-1d98c6347c9622d4334f80fc59623da524b4f37b.tar.gz
pacman-1d98c6347c9622d4334f80fc59623da524b4f37b.tar.xz
Merge branch 'maint'
Diffstat (limited to 'test')
-rw-r--r--test/pacman/tests/sync303.py38
-rw-r--r--test/pacman/tests/sync304.py27
2 files changed, 65 insertions, 0 deletions
diff --git a/test/pacman/tests/sync303.py b/test/pacman/tests/sync303.py
new file mode 100644
index 00000000..b717dd2c
--- /dev/null
+++ b/test/pacman/tests/sync303.py
@@ -0,0 +1,38 @@
+self.description = "Sysupgrade: upgrade pacman with deps as provisions"
+
+sp = pmpkg("pacman", "1.0-2")
+sp.depends = ["zlib"]
+self.addpkg2db("sync", sp)
+
+glibcdep = pmpkg("glibc", "2.13-1")
+self.addpkg2db("sync", glibcdep)
+
+zlibdep = pmpkg("zlib", "1.2.5-3")
+zlibdep.depends = ["glibc"]
+self.addpkg2db("sync", zlibdep)
+
+
+lp = pmpkg("pacman", "1.0-1")
+lp.depends = ["zlib"]
+self.addpkg2db("local", lp)
+
+lp2 = pmpkg("glibc-awesome", "2.13-2")
+lp2.provides = ["glibc=2.13"]
+lp2.conflicts = ["glibc"]
+self.addpkg2db("local", lp2)
+
+lp3 = pmpkg("zlib", "1.2.5-3")
+self.addpkg2db("local", lp3)
+
+self.option["SyncFirst"] = ["pacman"]
+
+self.args = "-Su"
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_EXIST=pacman")
+self.addrule("PKG_VERSION=pacman|1.0-2")
+self.addrule("PKG_EXIST=glibc-awesome")
+self.addrule("PKG_VERSION=glibc-awesome|2.13-2")
+self.addrule("PKG_EXIST=zlib")
+
+self.expectfailure = True
diff --git a/test/pacman/tests/sync304.py b/test/pacman/tests/sync304.py
new file mode 100644
index 00000000..4ac1a015
--- /dev/null
+++ b/test/pacman/tests/sync304.py
@@ -0,0 +1,27 @@
+self.description = "Sysupgrade: upgrade pacman being depended on"
+
+sp = pmpkg("pacman", "4.0.1-1")
+self.addpkg2db("sync", sp)
+
+sp2 = pmpkg("pyalpm", "2-1")
+sp2.depends = ["pacman>=4.0", "pacman<4.1"]
+self.addpkg2db("sync", sp2)
+
+lp = pmpkg("pacman", "3.5.4-1")
+self.addpkg2db("local", lp)
+
+lp2 = pmpkg("pyalpm", "1-1")
+lp2.depends = ["pacman>=3.5", "pacman<3.6"]
+self.addpkg2db("local", lp2)
+
+self.option["SyncFirst"] = ["pacman"]
+
+self.args = "-Su"
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_EXIST=pacman")
+self.addrule("PKG_VERSION=pacman|4.0.1-1")
+self.addrule("PKG_EXIST=pyalpm")
+self.addrule("PKG_VERSION=pyalpm|2-1")
+
+self.expectfailure = True