Date: Friday, February 23, 2007 @ 01:50:43
Author: dan
Path: /home/cvs-pacman/pacman-lib/pactest
Added: tests/upgrade041.py (1.1)
Modified: pmenv.py (1.4 -> 1.5) tests/TESTS (1.1 -> 1.2)
tests/add001.py (1.1 -> 1.2) tests/add002.py (1.1 -> 1.2)
tests/add003.py (1.1 -> 1.2) tests/add004.py (1.1 -> 1.2)
tests/add020.py (1.1 -> 1.2) tests/add021.py (1.1 -> 1.2)
tests/add032.py (1.1 -> 1.2) tests/add040.py (1.1 -> 1.2)
tests/add042.py (1.1 -> 1.2) tests/add050.py (1.1 -> 1.2)
tests/dummy001.py (1.1 -> 1.2) tests/query001.py (1.1 -> 1.2)
tests/remove010.py (1.1 -> 1.2) tests/remove011.py (1.1 -> 1.2)
tests/remove020.py (1.1 -> 1.2) tests/remove021.py (1.1 -> 1.2)
tests/remove030.py (1.1 -> 1.2) tests/smoke001.py (1.1 -> 1.2)
tests/sync001.py (1.1 -> 1.2) tests/sync002.py (1.1 -> 1.2)
tests/sync003.py (1.1 -> 1.2) tests/sync009.py (1.1 -> 1.2)
tests/sync010.py (1.1 -> 1.2) tests/sync020.py (1.1 -> 1.2)
tests/sync021.py (1.1 -> 1.2) tests/sync040.py (1.1 -> 1.2)
tests/sync041.py (1.1 -> 1.2) tests/sync042.py (1.1 -> 1.2)
tests/sync043.py (1.1 -> 1.2) tests/sync050.py (1.1 -> 1.2)
tests/sync103.py (1.1 -> 1.2) tests/sync200.py (1.1 -> 1.2)
tests/sync890.py (1.1 -> 1.2) tests/sync891.py (1.1 -> 1.2)
tests/sync892.py (1.1 -> 1.2) tests/sync893.py (1.1 -> 1.2)
tests/sync897.py (1.2 -> 1.3) tests/sync898.py (1.2 -> 1.3)
tests/sync990.py (1.1 -> 1.2) tests/sync992.py (1.1 -> 1.2)
tests/upgrade003.py (1.1 -> 1.2) tests/upgrade020.py (1.1 -> 1.2)
tests/upgrade030.py (1.1 -> 1.2) tests/upgrade040.py (1.1 -> 1.2)
* Changes to quite a few of the tests, mostly minimal changes (better
descriptions, additional rules, etc)
* One new pactest test regarding file migration between packages.
* Fix of a little output bug in pmenv.py
---------------------+
pmenv.py | 2 +-
tests/TESTS | 2 ++
tests/add001.py | 2 +-
tests/add002.py | 2 +-
tests/add003.py | 2 +-
tests/add004.py | 8 +++++++-
tests/add020.py | 2 +-
tests/add021.py | 2 +-
tests/add032.py | 2 +-
tests/add040.py | 2 +-
tests/add042.py | 8 ++++----
tests/add050.py | 1 +
tests/dummy001.py | 4 +++-
tests/query001.py | 3 ++-
tests/remove010.py | 5 +++--
tests/remove011.py | 5 +++--
tests/remove020.py | 5 +++--
tests/remove021.py | 5 +++--
tests/remove030.py | 3 ++-
tests/smoke001.py | 4 ++++
tests/sync001.py | 3 ++-
tests/sync002.py | 3 ++-
tests/sync003.py | 3 ++-
tests/sync009.py | 3 ++-
tests/sync010.py | 11 +++++++----
tests/sync020.py | 2 +-
tests/sync021.py | 2 +-
tests/sync040.py | 4 ++--
tests/sync041.py | 2 +-
tests/sync042.py | 2 +-
tests/sync043.py | 14 +++++++++-----
tests/sync050.py | 3 ++-
tests/sync103.py | 3 +--
tests/sync200.py | 2 +-
tests/sync890.py | 2 +-
tests/sync891.py | 2 +-
tests/sync892.py | 2 +-
tests/sync893.py | 4 ++--
tests/sync897.py | 2 +-
tests/sync898.py | 4 ++--
tests/sync990.py | 2 +-
tests/sync992.py | 2 +-
tests/upgrade003.py | 2 +-
tests/upgrade020.py | 2 +-
tests/upgrade030.py | 1 -
tests/upgrade040.py | 7 ++++++-
tests/upgrade041.py | 30 ++++++++++++++++++++++++++++++
47 files changed, 127 insertions(+), 61 deletions(-)
Index: pacman-lib/pactest/pmenv.py
diff -u pacman-lib/pactest/pmenv.py:1.4 pacman-lib/pactest/pmenv.py:1.5
--- pacman-lib/pactest/pmenv.py:1.4 Fri Feb 23 00:11:43 2007
+++ pacman-lib/pactest/pmenv.py Fri Feb 23 01:50:42 2007
@@ -100,7 +100,7 @@
passed += 1
else:
print "[FAILED]",
- print test.name.strip(".py").ljust(33),
+ print test.name.replace(".py", "").ljust(33),
print "Rules:",
print "OK = %2u FAIL = %2u SKIP = %2u" % \
(success, fail, rules - (success + fail))
Index: pacman-lib/pactest/tests/TESTS
diff -u pacman-lib/pactest/tests/TESTS:1.1 pacman-lib/pactest/tests/TESTS:1.2
--- pacman-lib/pactest/tests/TESTS:1.1 Sun Oct 15 15:04:28 2006
+++ pacman-lib/pactest/tests/TESTS Fri Feb 23 01:50:42 2007
@@ -1,3 +1,5 @@
+TODO: this is really outdated, needs regeneration (after we rename tests)
+
add001: Install a package
add002: Install a package (already installed)
add003: Install a set of packages
Index: pacman-lib/pactest/tests/add001.py
diff -u pacman-lib/pactest/tests/add001.py:1.1 pacman-lib/pactest/tests/add001.py:1.2
--- pacman-lib/pactest/tests/add001.py:1.1 Sun Oct 15 15:04:28 2006
+++ pacman-lib/pactest/tests/add001.py Fri Feb 23 01:50:42 2007
@@ -1,4 +1,4 @@
-self.description = "Install a package"
+self.description = "Install a simple package with two files"
p = pmpkg("dummy")
p.files = ["bin/dummy",
Index: pacman-lib/pactest/tests/add002.py
diff -u pacman-lib/pactest/tests/add002.py:1.1 pacman-lib/pactest/tests/add002.py:1.2
--- pacman-lib/pactest/tests/add002.py:1.1 Sun Oct 15 15:04:28 2006
+++ pacman-lib/pactest/tests/add002.py Fri Feb 23 01:50:42 2007
@@ -1,4 +1,4 @@
-self.description = "Install a package (already installed)"
+self.description = "Install an already-installed package"
lp = pmpkg("dummy")
lp.files = ["bin/dummy",
Index: pacman-lib/pactest/tests/add003.py
diff -u pacman-lib/pactest/tests/add003.py:1.1 pacman-lib/pactest/tests/add003.py:1.2
--- pacman-lib/pactest/tests/add003.py:1.1 Sun Oct 15 15:04:28 2006
+++ pacman-lib/pactest/tests/add003.py Fri Feb 23 01:50:42 2007
@@ -1,4 +1,4 @@
-self.description = "Install a set of packages"
+self.description = "Install a set of three packages"
p1 = pmpkg("pkg1")
p1.files = ["bin/pkg1",
Index: pacman-lib/pactest/tests/add004.py
diff -u pacman-lib/pactest/tests/add004.py:1.1 pacman-lib/pactest/tests/add004.py:1.2
--- pacman-lib/pactest/tests/add004.py:1.1 Sun Oct 15 15:04:28 2006
+++ pacman-lib/pactest/tests/add004.py Fri Feb 23 01:50:42 2007
@@ -1,8 +1,12 @@
-self.description = "Install a set of the same package at different versions"
+self.description = "Install three of the same package at different versions"
p1 = pmpkg("dummy", "1.0-2")
+p1.files = ["bin/dummy"]
p2 = pmpkg("dummy", "2.0-1")
+p2.files = ["bin/dummy"]
p3 = pmpkg("dummy")
+p3.files = ["bin/dummy"]
+
for p in p1, p2, p3:
self.addpkg(p)
@@ -10,3 +14,5 @@
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=dummy|2.0-1")
+for f in p2.files:
+ self.addrule("FILE_EXIST=%s" % f)
Index: pacman-lib/pactest/tests/add020.py
diff -u pacman-lib/pactest/tests/add020.py:1.1 pacman-lib/pactest/tests/add020.py:1.2
--- pacman-lib/pactest/tests/add020.py:1.1 Sun Oct 15 15:04:29 2006
+++ pacman-lib/pactest/tests/add020.py Fri Feb 23 01:50:42 2007
@@ -1,4 +1,4 @@
-self.description = "Install a package with an existing file"
+self.description = "Install a package with an existing file (--force)"
p = pmpkg("dummy")
p.files = ["etc/dummy.conf"]
Index: pacman-lib/pactest/tests/add021.py
diff -u pacman-lib/pactest/tests/add021.py:1.1 pacman-lib/pactest/tests/add021.py:1.2
--- pacman-lib/pactest/tests/add021.py:1.1 Sun Oct 15 15:04:29 2006
+++ pacman-lib/pactest/tests/add021.py Fri Feb 23 01:50:42 2007
@@ -1,4 +1,4 @@
-self.description = "Install a package with an existing file (new modified)"
+self.description = "Install a package with an existing file (--force, new modified)"
p = pmpkg("dummy")
p.files = ["etc/dummy.conf*"]
Index: pacman-lib/pactest/tests/add032.py
diff -u pacman-lib/pactest/tests/add032.py:1.1 pacman-lib/pactest/tests/add032.py:1.2
--- pacman-lib/pactest/tests/add032.py:1.1 Sun Oct 15 15:04:29 2006
+++ pacman-lib/pactest/tests/add032.py Fri Feb 23 01:50:42 2007
@@ -1,4 +1,4 @@
-self.description = "Freshen a package (installed is newer)"
+self.description = "Freshen a package (installed is same)"
lp = pmpkg("dummy")
lp.files = ["bin/dummy",
Index: pacman-lib/pactest/tests/add040.py
diff -u pacman-lib/pactest/tests/add040.py:1.1 pacman-lib/pactest/tests/add040.py:1.2
--- pacman-lib/pactest/tests/add040.py:1.1 Sun Oct 15 15:04:29 2006
+++ pacman-lib/pactest/tests/add040.py Fri Feb 23 01:50:42 2007
@@ -3,7 +3,7 @@
p = pmpkg("dummy")
p.files = ["bin/dummy",
"usr/man/man1/dummy.1"]
-p.depends = ["missdep"]
+p.depends = ["dep1"]
self.addpkg(p)
self.args = "-A %s" % p.filename()
Index: pacman-lib/pactest/tests/add042.py
diff -u pacman-lib/pactest/tests/add042.py:1.1 pacman-lib/pactest/tests/add042.py:1.2
--- pacman-lib/pactest/tests/add042.py:1.1 Sun Oct 15 15:04:29 2006
+++ pacman-lib/pactest/tests/add042.py Fri Feb 23 01:50:42 2007
@@ -19,11 +19,11 @@
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=dummy|1.0-2")
-for f in p1.files:
- self.addrule("FILE_EXIST=%s" % f)
-self.addrule("PKG_EXIST=dep1")
-self.addrule("PKG_EXIST=dep2")
self.addrule("PKG_DEPENDS=dummy|dep1")
self.addrule("PKG_DEPENDS=dep1|dep2")
self.addrule("PKG_REQUIREDBY=dep1|dummy")
self.addrule("PKG_REQUIREDBY=dep2|dep1")
+for p in p1, p2, p3:
+ self.addrule("PKG_EXIST=%s" % p.name)
+ for f in p.files:
+ self.addrule("FILE_EXIST=%s" % f)
Index: pacman-lib/pactest/tests/add050.py
diff -u pacman-lib/pactest/tests/add050.py:1.1 pacman-lib/pactest/tests/add050.py:1.2
--- pacman-lib/pactest/tests/add050.py:1.1 Sun Oct 15 15:04:29 2006
+++ pacman-lib/pactest/tests/add050.py Fri Feb 23 01:50:42 2007
@@ -2,6 +2,7 @@
p = pmpkg("dummy")
p.files = ["etc/dummy.conf"]
+p.backup = ["etc/dummy.conf"]
self.addpkg(p)
self.filesystem = ["etc/dummy.conf"]
Index: pacman-lib/pactest/tests/dummy001.py
diff -u pacman-lib/pactest/tests/dummy001.py:1.1 pacman-lib/pactest/tests/dummy001.py:1.2
--- pacman-lib/pactest/tests/dummy001.py:1.1 Sun Oct 15 15:04:29 2006
+++ pacman-lib/pactest/tests/dummy001.py Fri Feb 23 01:50:42 2007
@@ -1,4 +1,4 @@
-self.description = "dummy test case"
+self.description = "Dummy test case (modify for own use)"
p1 = pmpkg("dummy")
p1.files = ["etc/dummy.conf*",
@@ -17,3 +17,5 @@
#self.addpkg(p2)
self.args = "-U %s" % p1.filename()
+
+self.addrule("PACMAN_RETCODE=0")
Index: pacman-lib/pactest/tests/query001.py
diff -u pacman-lib/pactest/tests/query001.py:1.1 pacman-lib/pactest/tests/query001.py:1.2
--- pacman-lib/pactest/tests/query001.py:1.1 Sun Oct 15 15:04:29 2006
+++ pacman-lib/pactest/tests/query001.py Fri Feb 23 01:50:42 2007
@@ -4,6 +4,7 @@
p.files = ["bin/foobar"]
self.addpkg2db("local", p)
-self.args = "-Q foobar"
+self.args = "-Q %s" % p.name
+self.addrule("PACMAN_RETCODE=0")
self.addrule("PACMAN_OUTPUT=foobar")
Index: pacman-lib/pactest/tests/remove010.py
diff -u pacman-lib/pactest/tests/remove010.py:1.1 pacman-lib/pactest/tests/remove010.py:1.2
--- pacman-lib/pactest/tests/remove010.py:1.1 Sun Oct 15 15:04:29 2006
+++ pacman-lib/pactest/tests/remove010.py Fri Feb 23 01:50:42 2007
@@ -1,12 +1,13 @@
-self.description = "Remove a package, with a file marked for backup"
+self.description = "Remove a package with a file marked for backup"
p1 = pmpkg("dummy")
p1.files = ["etc/dummy.conf"]
p1.backup = ["etc/dummy.conf"]
self.addpkg2db("local", p1)
-self.args = "-R dummy"
+self.args = "-R %s" % p1.name
+self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=dummy")
self.addrule("!FILE_EXIST=etc/dummy.conf")
self.addrule("FILE_PACSAVE=etc/dummy.conf")
Index: pacman-lib/pactest/tests/remove011.py
diff -u pacman-lib/pactest/tests/remove011.py:1.1 pacman-lib/pactest/tests/remove011.py:1.2
--- pacman-lib/pactest/tests/remove011.py:1.1 Sun Oct 15 15:04:29 2006
+++ pacman-lib/pactest/tests/remove011.py Fri Feb 23 01:50:42 2007
@@ -1,12 +1,13 @@
-self.description = "Remove a package, with a modified file marked for backup"
+self.description = "Remove a package with a modified file marked for backup"
p1 = pmpkg("dummy")
p1.files = ["etc/dummy.conf*"]
p1.backup = ["etc/dummy.conf"]
self.addpkg2db("local", p1)
-self.args = "-R dummy"
+self.args = "-R %s" % p1.name
+self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=dummy")
self.addrule("!FILE_EXIST=etc/dummy.conf")
self.addrule("FILE_PACSAVE=etc/dummy.conf")
Index: pacman-lib/pactest/tests/remove020.py
diff -u pacman-lib/pactest/tests/remove020.py:1.1 pacman-lib/pactest/tests/remove020.py:1.2
--- pacman-lib/pactest/tests/remove020.py:1.1 Sun Oct 15 15:04:30 2006
+++ pacman-lib/pactest/tests/remove020.py Fri Feb 23 01:50:42 2007
@@ -1,12 +1,13 @@
-self.description = "Remove a package, with a file marked for backup (--nosave)"
+self.description = "Remove a package with a file marked for backup (--nosave)"
p1 = pmpkg("dummy")
p1.files = ["etc/dummy.conf"]
p1.backup = ["etc/dummy.conf"]
self.addpkg2db("local", p1)
-self.args = "-Rn dummy"
+self.args = "-R %s" % p1.name
+self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=dummy")
self.addrule("!FILE_EXIST=etc/dummy.conf")
self.addrule("!FILE_PACSAVE=etc/dummy.conf")
Index: pacman-lib/pactest/tests/remove021.py
diff -u pacman-lib/pactest/tests/remove021.py:1.1 pacman-lib/pactest/tests/remove021.py:1.2
--- pacman-lib/pactest/tests/remove021.py:1.1 Sun Oct 15 15:04:30 2006
+++ pacman-lib/pactest/tests/remove021.py Fri Feb 23 01:50:42 2007
@@ -1,12 +1,13 @@
-self.description = "Remove a package, with a modified file marked for backup (--nosave)"
+self.description = "Remove a package with a modified file marked for backup (--nosave)"
p1 = pmpkg("dummy")
p1.files = ["etc/dummy.conf*"]
p1.backup = ["etc/dummy.conf"]
self.addpkg2db("local", p1)
-self.args = "-Rn dummy"
+self.args = "-R %s" % p1.name
+self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=dummy")
self.addrule("!FILE_EXIST=etc/dummy.conf")
self.addrule("!FILE_PACSAVE=etc/dummy.conf")
Index: pacman-lib/pactest/tests/remove030.py
diff -u pacman-lib/pactest/tests/remove030.py:1.1 pacman-lib/pactest/tests/remove030.py:1.2
--- pacman-lib/pactest/tests/remove030.py:1.1 Sun Oct 15 15:04:30 2006
+++ pacman-lib/pactest/tests/remove030.py Fri Feb 23 01:50:42 2007
@@ -5,8 +5,9 @@
self.option["holdpkg"] = ["dummy"]
-self.args = "-R dummy"
+self.args = "-R %s" % p1.name
+self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=dummy")
self.addrule("!FILE_EXIST=etc/dummy.conf")
self.addrule("!FILE_PACSAVE=etc/dummy.conf")
Index: pacman-lib/pactest/tests/smoke001.py
diff -u pacman-lib/pactest/tests/smoke001.py:1.1 pacman-lib/pactest/tests/smoke001.py:1.2
--- pacman-lib/pactest/tests/smoke001.py:1.1 Sun Oct 15 15:04:30 2006
+++ pacman-lib/pactest/tests/smoke001.py Fri Feb 23 01:50:42 2007
@@ -17,3 +17,7 @@
self.addrule("PACMAN_RETCODE=0")
#for i in range(1000):
# self.addrule("PKG_EXIST=pkg%03d" %i)
+# picked 3 random packages to test for, since the loop is too much to handle
+self.addrule("PKG_EXIST=pkg050")
+self.addrule("PKG_EXIST=pkg674")
+self.addrule("PKG_EXIST=pkg999")
Index: pacman-lib/pactest/tests/sync001.py
diff -u pacman-lib/pactest/tests/sync001.py:1.1 pacman-lib/pactest/tests/sync001.py:1.2
--- pacman-lib/pactest/tests/sync001.py:1.1 Sun Oct 15 15:04:30 2006
+++ pacman-lib/pactest/tests/sync001.py Fri Feb 23 01:50:42 2007
@@ -5,8 +5,9 @@
"usr/man/man1/dummy.1"]
self.addpkg2db("sync", sp)
-self.args = "-S dummy"
+self.args = "-S %s" % sp.name
+self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=dummy")
for f in sp.files:
self.addrule("FILE_EXIST=%s" % f)
Index: pacman-lib/pactest/tests/sync002.py
diff -u pacman-lib/pactest/tests/sync002.py:1.1 pacman-lib/pactest/tests/sync002.py:1.2
--- pacman-lib/pactest/tests/sync002.py:1.1 Sun Oct 15 15:04:30 2006
+++ pacman-lib/pactest/tests/sync002.py Fri Feb 23 01:50:42 2007
@@ -10,8 +10,9 @@
"usr/man/man1/dummy.1"]
self.addpkg2db("local", lp)
-self.args = "-S dummy"
+self.args = "-S %s" % sp.name
+self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=dummy|1.0-2")
for f in lp.files:
self.addrule("FILE_MODIFIED=%s" % f)
Index: pacman-lib/pactest/tests/sync003.py
diff -u pacman-lib/pactest/tests/sync003.py:1.1 pacman-lib/pactest/tests/sync003.py:1.2
--- pacman-lib/pactest/tests/sync003.py:1.1 Sun Oct 15 15:04:30 2006
+++ pacman-lib/pactest/tests/sync003.py Fri Feb 23 01:50:42 2007
@@ -7,6 +7,7 @@
self.filesystem = ["bin/dummy"]
-self.args = "-S dummy"
+self.args = "-S %s" % sp.name
+self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=dummy")
Index: pacman-lib/pactest/tests/sync009.py
diff -u pacman-lib/pactest/tests/sync009.py:1.1 pacman-lib/pactest/tests/sync009.py:1.2
--- pacman-lib/pactest/tests/sync009.py:1.1 Sun Oct 15 15:04:30 2006
+++ pacman-lib/pactest/tests/sync009.py Fri Feb 23 01:50:42 2007
@@ -5,8 +5,9 @@
"usr/man/man1/dummy.1"]
self.addpkg2db("sync", sp)
-self.args = "-S dummy"
+self.args = "-S %s" % sp.name
+self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=dummy")
for f in sp.files:
self.addrule("FILE_EXIST=%s" % f)
Index: pacman-lib/pactest/tests/sync010.py
diff -u pacman-lib/pactest/tests/sync010.py:1.1 pacman-lib/pactest/tests/sync010.py:1.2
--- pacman-lib/pactest/tests/sync010.py:1.1 Sun Oct 15 15:04:30 2006
+++ pacman-lib/pactest/tests/sync010.py Fri Feb 23 01:50:42 2007
@@ -1,4 +1,4 @@
-self.description = "Install a package from a sync db, with its dependencies"
+self.description = "Install a package from a sync db with cascaded dependencies"
sp1 = pmpkg("dummy", "1.0-2")
sp1.files = ["bin/dummy",
@@ -15,12 +15,15 @@
for p in sp1, sp2, sp3:
self.addpkg2db("sync", p);
-self.args = "-S dummy"
+self.args = "-S %s" % sp1.name
+self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=dummy|1.0-2")
self.addrule("PKG_DEPENDS=dummy|dep1")
-for f in sp1.files:
- self.addrule("FILE_EXIST=%s" % f)
+for p in sp1, sp2, sp3:
+ self.addrule("PKG_EXIST=%s" % p.name)
+ for f in p.files:
+ self.addrule("FILE_EXIST=%s" % f)
self.addrule("PKG_DEPENDS=dep1|dep2")
self.addrule("PKG_REQUIREDBY=dep1|dummy")
self.addrule("PKG_REQUIREDBY=dep2|dep1")
Index: pacman-lib/pactest/tests/sync020.py
diff -u pacman-lib/pactest/tests/sync020.py:1.1 pacman-lib/pactest/tests/sync020.py:1.2
--- pacman-lib/pactest/tests/sync020.py:1.1 Sun Oct 15 15:04:30 2006
+++ pacman-lib/pactest/tests/sync020.py Fri Feb 23 01:50:42 2007
@@ -12,7 +12,7 @@
for p in sp1, sp2, sp3:
self.addpkg2db("sync", p);
-self.args = "-S grp"
+self.args = "-S %s" % "grp"
self.addrule("PACMAN_RETCODE=0")
for p in sp1, sp2, sp3:
Index: pacman-lib/pactest/tests/sync021.py
diff -u pacman-lib/pactest/tests/sync021.py:1.1 pacman-lib/pactest/tests/sync021.py:1.2
--- pacman-lib/pactest/tests/sync021.py:1.1 Sun Oct 15 15:04:30 2006
+++ pacman-lib/pactest/tests/sync021.py Fri Feb 23 01:50:42 2007
@@ -1,4 +1,4 @@
-self.description = "Install a group from a sync db, with a package in IgnorePkg"
+self.description = "Install a group from a sync db with a package in IgnorePkg"
sp1 = pmpkg("pkg1")
sp1.groups = ["grp"]
Index: pacman-lib/pactest/tests/sync040.py
diff -u pacman-lib/pactest/tests/sync040.py:1.1 pacman-lib/pactest/tests/sync040.py:1.2
--- pacman-lib/pactest/tests/sync040.py:1.1 Sun Oct 15 15:04:30 2006
+++ pacman-lib/pactest/tests/sync040.py Fri Feb 23 01:50:42 2007
@@ -1,4 +1,4 @@
-self.description = "Install two targets with a conflict"
+self.description = "Install two targets from a sync db with a conflict"
sp1 = pmpkg("pkg1")
sp1.conflicts = ["pkg2"]
@@ -8,7 +8,7 @@
for p in sp1, sp2:
self.addpkg2db("sync", p);
-self.args = "-S pkg1 pkg2"
+self.args = "-S %s" % " ".join([p.name for p in sp1, sp2])
self.addrule("PACMAN_RETCODE=1")
for p in sp1, sp2:
Index: pacman-lib/pactest/tests/sync041.py
diff -u pacman-lib/pactest/tests/sync041.py:1.1 pacman-lib/pactest/tests/sync041.py:1.2
--- pacman-lib/pactest/tests/sync041.py:1.1 Sun Oct 15 15:04:30 2006
+++ pacman-lib/pactest/tests/sync041.py Fri Feb 23 01:50:43 2007
@@ -9,7 +9,7 @@
for p in sp1, sp2:
self.addpkg2db("sync", p);
-self.args = "-S pkg1 pkg2"
+self.args = "-S %s" % " ".join([p.name for p in sp1, sp2])
self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=pkg1")
Index: pacman-lib/pactest/tests/sync042.py
diff -u pacman-lib/pactest/tests/sync042.py:1.1 pacman-lib/pactest/tests/sync042.py:1.2
--- pacman-lib/pactest/tests/sync042.py:1.1 Sun Oct 15 15:04:30 2006
+++ pacman-lib/pactest/tests/sync042.py Fri Feb 23 01:50:43 2007
@@ -7,7 +7,7 @@
lp = pmpkg("pkg2")
self.addpkg2db("local", lp);
-self.args = "-S pkg1"
+self.args = "-S %s" % sp.name
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
Index: pacman-lib/pactest/tests/sync043.py
diff -u pacman-lib/pactest/tests/sync043.py:1.1 pacman-lib/pactest/tests/sync043.py:1.2
--- pacman-lib/pactest/tests/sync043.py:1.1 Sun Oct 15 15:04:30 2006
+++ pacman-lib/pactest/tests/sync043.py Fri Feb 23 01:50:43 2007
@@ -1,14 +1,18 @@
-self.description = "Install a sync package conflicting with a local one"
+self.description = "Install a sync package conflicting with two local ones"
sp = pmpkg("pkg1")
-sp.conflicts = ["pkg2"]
+sp.conflicts = ["pkg2", "pkg3"]
self.addpkg2db("sync", sp);
-lp = pmpkg("pkg2")
-self.addpkg2db("local", lp);
+lp1 = pmpkg("pkg2")
+self.addpkg2db("local", lp1);
-self.args = "-S pkg1"
+lp1 = pmpkg("pkg3")
+self.addpkg2db("local", lp1);
+
+self.args = "-S %s" % sp.name
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
self.addrule("!PKG_EXIST=pkg2")
+self.addrule("!PKG_EXIST=pkg3")
Index: pacman-lib/pactest/tests/sync050.py
diff -u pacman-lib/pactest/tests/sync050.py:1.1 pacman-lib/pactest/tests/sync050.py:1.2
--- pacman-lib/pactest/tests/sync050.py:1.1 Sun Oct 15 15:04:30 2006
+++ pacman-lib/pactest/tests/sync050.py Fri Feb 23 01:50:43 2007
@@ -4,7 +4,8 @@
sp1.provides = ["pkg2"]
self.addpkg2db("sync", sp1);
-self.args = "-S pkg2"
+self.args = "-S %s" % sp1.name
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
+self.addrule("!PKG_EXIST=pkg2")
Index: pacman-lib/pactest/tests/sync103.py
diff -u pacman-lib/pactest/tests/sync103.py:1.1 pacman-lib/pactest/tests/sync103.py:1.2
--- pacman-lib/pactest/tests/sync103.py:1.1 Sun Oct 15 15:04:31 2006
+++ pacman-lib/pactest/tests/sync103.py Fri Feb 23 01:50:43 2007
@@ -1,14 +1,13 @@
self.description = "Sysupgrade with a local package not existing in sync db"
sp = pmpkg("spkg")
-
self.addpkg2db("sync", sp)
lp = pmpkg("lpkg")
-
self.addpkg2db("local", lp)
self.args = "-Su"
self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_MODIFIED=lpkg")
+self.addrule("!PKG_EXIST=spkg")
Index: pacman-lib/pactest/tests/sync200.py
diff -u pacman-lib/pactest/tests/sync200.py:1.1 pacman-lib/pactest/tests/sync200.py:1.2
--- pacman-lib/pactest/tests/sync200.py:1.1 Sun Oct 15 15:04:31 2006
+++ pacman-lib/pactest/tests/sync200.py Fri Feb 23 01:50:43 2007
@@ -1,4 +1,4 @@
-self.description = "Synchronize database"
+self.description = "Synchronize the local database"
sp1 = pmpkg("spkg1", "1.0-1")
sp1.depends = ["spkg2"]
Index: pacman-lib/pactest/tests/sync890.py
diff -u pacman-lib/pactest/tests/sync890.py:1.1 pacman-lib/pactest/tests/sync890.py:1.2
--- pacman-lib/pactest/tests/sync890.py:1.1 Sun Oct 15 15:04:31 2006
+++ pacman-lib/pactest/tests/sync890.py Fri Feb 23 01:50:43 2007
@@ -12,7 +12,7 @@
for p in lp1, lp2:
self.addpkg2db("local", p)
-self.args = "-S pkg3"
+self.args = "-S %s" % sp.name
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
Index: pacman-lib/pactest/tests/sync891.py
diff -u pacman-lib/pactest/tests/sync891.py:1.1 pacman-lib/pactest/tests/sync891.py:1.2
--- pacman-lib/pactest/tests/sync891.py:1.1 Sun Oct 15 15:04:31 2006
+++ pacman-lib/pactest/tests/sync891.py Fri Feb 23 01:50:43 2007
@@ -14,7 +14,7 @@
for p in lp1, lp2:
self.addpkg2db("local", p)
-self.args = "-S pkg2 pkg3"
+self.args = "-S %s" % " ".join([p.name for p in sp1, sp2])
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
Index: pacman-lib/pactest/tests/sync892.py
diff -u pacman-lib/pactest/tests/sync892.py:1.1 pacman-lib/pactest/tests/sync892.py:1.2
--- pacman-lib/pactest/tests/sync892.py:1.1 Sun Oct 15 15:04:32 2006
+++ pacman-lib/pactest/tests/sync892.py Fri Feb 23 01:50:43 2007
@@ -16,7 +16,7 @@
for p in lp1, lp2:
self.addpkg2db("local", p)
-self.args = "-S pkg2 pkg3"
+self.args = "-S %s" % " ".join([p.name for p in sp1, sp2])
self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=pkg1")
Index: pacman-lib/pactest/tests/sync893.py
diff -u pacman-lib/pactest/tests/sync893.py:1.1 pacman-lib/pactest/tests/sync893.py:1.2
--- pacman-lib/pactest/tests/sync893.py:1.1 Sun Oct 15 15:04:32 2006
+++ pacman-lib/pactest/tests/sync893.py Fri Feb 23 01:50:43 2007
@@ -1,4 +1,4 @@
-self.description = "conflict (bug)"
+self.description = "conflict 'db vs db'"
sp1 = pmpkg("pkg1", "1.0-2")
sp1.conflicts = ["pkg2"]
@@ -13,7 +13,7 @@
lp2 = pmpkg("pkg2")
self.addpkg2db("local", lp2)
-self.args = "-S pkg1 pkg2"
+self.args = "-S %s" % " ".join([p.name for p in sp1, sp2])
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
Index: pacman-lib/pactest/tests/sync897.py
diff -u pacman-lib/pactest/tests/sync897.py:1.2 pacman-lib/pactest/tests/sync897.py:1.3
--- pacman-lib/pactest/tests/sync897.py:1.2 Wed Feb 21 01:33:13 2007
+++ pacman-lib/pactest/tests/sync897.py Fri Feb 23 01:50:43 2007
@@ -1,4 +1,4 @@
-self.description = "System upgrade"
+self.description = "System upgrade with package conflicts"
sp1 = pmpkg("pkg1", "1.0-2")
sp1.conflicts = ["pkg2"]
Index: pacman-lib/pactest/tests/sync898.py
diff -u pacman-lib/pactest/tests/sync898.py:1.2 pacman-lib/pactest/tests/sync898.py:1.3
--- pacman-lib/pactest/tests/sync898.py:1.2 Sat Oct 21 16:04:36 2006
+++ pacman-lib/pactest/tests/sync898.py Fri Feb 23 01:50:43 2007
@@ -1,4 +1,4 @@
-self.description = "System upgrade"
+self.description = "System upgrade with conflicts and provides"
sp1 = pmpkg("pkg1", "1.0-2")
sp1.conflicts = ["pkg2"]
@@ -11,7 +11,7 @@
lp1 = pmpkg("pkg1")
self.addpkg2db("local", lp1)
-self.args = "-S pkg1 pkg2"
+self.args = "-S %s" % " ".join([p.name for p in sp1, sp2])
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_MODIFIED=pkg1")
Index: pacman-lib/pactest/tests/sync990.py
diff -u pacman-lib/pactest/tests/sync990.py:1.1 pacman-lib/pactest/tests/sync990.py:1.2
--- pacman-lib/pactest/tests/sync990.py:1.1 Sun Oct 15 15:04:32 2006
+++ pacman-lib/pactest/tests/sync990.py Fri Feb 23 01:50:43 2007
@@ -12,7 +12,7 @@
for p in sp1, sp2, sp3:
self.addpkg2db("sync", p)
-self.args = "-S pkg1 pkg2"
+self.args = "-S %s" % " ".join([p.name for p in sp1, sp2])
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
Index: pacman-lib/pactest/tests/sync992.py
diff -u pacman-lib/pactest/tests/sync992.py:1.1 pacman-lib/pactest/tests/sync992.py:1.2
--- pacman-lib/pactest/tests/sync992.py:1.1 Sun Oct 15 15:04:32 2006
+++ pacman-lib/pactest/tests/sync992.py Fri Feb 23 01:50:43 2007
@@ -15,7 +15,7 @@
lp1 = pmpkg("pkg2", "0.1-1")
self.addpkg2db("local", lp1)
-self.args = "-S pkg1 pkg2"
+self.args = "-S %s" % " ".join([p.name for p in sp1, sp2])
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
Index: pacman-lib/pactest/tests/upgrade003.py
diff -u pacman-lib/pactest/tests/upgrade003.py:1.1 pacman-lib/pactest/tests/upgrade003.py:1.2
--- pacman-lib/pactest/tests/upgrade003.py:1.1 Sun Oct 15 15:04:32 2006
+++ pacman-lib/pactest/tests/upgrade003.py Fri Feb 23 01:50:43 2007
@@ -1,4 +1,4 @@
-self.description = "Upgrade a package (lesser version)"
+self.description = "Upgrade a package (older version)"
lp = pmpkg("dummy", "1.0-2")
lp.files = ["bin/dummy",
Index: pacman-lib/pactest/tests/upgrade020.py
diff -u pacman-lib/pactest/tests/upgrade020.py:1.1 pacman-lib/pactest/tests/upgrade020.py:1.2
--- pacman-lib/pactest/tests/upgrade020.py:1.1 Sun Oct 15 15:04:32 2006
+++ pacman-lib/pactest/tests/upgrade020.py Fri Feb 23 01:50:43 2007
@@ -1,4 +1,4 @@
-self.description = "Upgrade a package, with a file in 'backup' (new modified)"
+self.description = "Upgrade a package, with a file in 'backup' (local unchanged, new modified)"
lp = pmpkg("dummy")
lp.files = ["etc/dummy.conf"]
Index: pacman-lib/pactest/tests/upgrade030.py
diff -u pacman-lib/pactest/tests/upgrade030.py:1.1 pacman-lib/pactest/tests/upgrade030.py:1.2
--- pacman-lib/pactest/tests/upgrade030.py:1.1 Sun Oct 15 15:04:33 2006
+++ pacman-lib/pactest/tests/upgrade030.py Fri Feb 23 01:50:43 2007
@@ -15,7 +15,6 @@
self.addpkg(p)
self.args = "-U %s" % " ".join([p.filename() for p in p1, p2])
-#self.args = "-Qi %s" % " ".join([p.name for p in lp1, lp2])
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_REASON=pkg1|0")
Index: pacman-lib/pactest/tests/upgrade040.py
diff -u pacman-lib/pactest/tests/upgrade040.py:1.1 pacman-lib/pactest/tests/upgrade040.py:1.2
--- pacman-lib/pactest/tests/upgrade040.py:1.1 Sun Oct 15 15:04:33 2006
+++ pacman-lib/pactest/tests/upgrade040.py Fri Feb 23 01:50:43 2007
@@ -1,4 +1,4 @@
-self.description = "file relocation 1"
+self.description = "File relocation between two packages"
lp1 = pmpkg("dummy")
lp1.files = ["bin/dummy",
@@ -23,3 +23,8 @@
self.args = "-U %s" % " ".join([p.filename() for p in p1, p2])
self.addrule("PACMAN_RETCODE=0")
+for p in p1, p2:
+ self.addrule("PKG_EXIST=%s" % p.name)
+self.addrule("FILE_MODIFIED=bin/dummy")
+self.addrule("FILE_MODIFIED=bin/foobar")
+self.addrule("FILE_MODIFIED=usr/share/file")
Index: pacman-lib/pactest/tests/upgrade041.py
diff -u /dev/null pacman-lib/pactest/tests/upgrade041.py:1.1
--- /dev/null Fri Feb 23 01:50:44 2007
+++ pacman-lib/pactest/tests/upgrade041.py Fri Feb 23 01:50:43 2007
@@ -0,0 +1,30 @@
+self.description = "File relocation between two packages (reverse order)"
+
+lp1 = pmpkg("dummy")
+lp1.files = ["bin/dummy"]
+
+lp2 = pmpkg("foobar")
+lp2.files = ["bin/foobar"
+ "usr/share/file"]
+
+for p in lp1, lp2:
+ self.addpkg2db("local", p)
+
+p1 = pmpkg("dummy")
+p1.files = ["bin/dummy",
+ "usr/share/file"]
+
+p2 = pmpkg("foobar")
+p2.files = ["bin/foobar"]
+
+for p in p1, p2:
+ self.addpkg(p)
+
+self.args = "-U %s" % " ".join([p.filename() for p in p1, p2])
+
+self.addrule("PACMAN_RETCODE=0")
+for p in p1, p2:
+ self.addrule("PKG_EXIST=%s" % p.name)
+self.addrule("FILE_MODIFIED=bin/dummy")
+self.addrule("FILE_MODIFIED=bin/foobar")
+self.addrule("FILE_MODIFIED=usr/share/file")