From 014306eb99c90c5c5c6d19d50aa47e29c25e8e14 Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Sun, 28 Oct 2007 13:39:12 +0100 Subject: simple pactest renaming : split conflict* into depconflict* and fileconflict*. Signed-off-by: Chantry Xavier Signed-off-by: Dan McGee --- pactest/tests/conflict001.py | 19 ------------------- pactest/tests/conflict002.py | 13 ------------- pactest/tests/conflict003.py | 13 ------------- pactest/tests/conflict004.py | 15 --------------- pactest/tests/conflict005.py | 20 -------------------- pactest/tests/conflict006.py | 17 ----------------- pactest/tests/depconflict100.py | 15 +++++++++++++++ pactest/tests/depconflict110.py | 13 +++++++++++++ pactest/tests/depconflict111.py | 13 +++++++++++++ pactest/tests/depconflict120.py | 19 +++++++++++++++++++ pactest/tests/fileconflict001.py | 20 ++++++++++++++++++++ pactest/tests/fileconflict002.py | 16 ++++++++++++++++ 12 files changed, 96 insertions(+), 97 deletions(-) delete mode 100644 pactest/tests/conflict001.py delete mode 100644 pactest/tests/conflict002.py delete mode 100644 pactest/tests/conflict003.py delete mode 100644 pactest/tests/conflict004.py delete mode 100644 pactest/tests/conflict005.py delete mode 100644 pactest/tests/conflict006.py create mode 100644 pactest/tests/depconflict100.py create mode 100644 pactest/tests/depconflict110.py create mode 100644 pactest/tests/depconflict111.py create mode 100644 pactest/tests/depconflict120.py create mode 100644 pactest/tests/fileconflict001.py create mode 100644 pactest/tests/fileconflict002.py diff --git a/pactest/tests/conflict001.py b/pactest/tests/conflict001.py deleted file mode 100644 index a9f3f6b3..00000000 --- a/pactest/tests/conflict001.py +++ /dev/null @@ -1,19 +0,0 @@ -self.description = "target vs db conflict will disappear after upgrade" - -sp1 = pmpkg("pkg1") -sp1.conflicts = ["imaginary"] -self.addpkg2db("sync", sp1); - -sp2 = pmpkg("pkg2", "1.0-2") -self.addpkg2db("sync", sp2) - -lp = pmpkg("pkg2", "1.0-1") -lp.provides = ["imaginary"] -self.addpkg2db("local", lp) - -self.args = "-S %s" % " ".join([p.name for p in sp1, sp2]) - -self.addrule("PACMAN_RETCODE=0") -self.addrule("PKG_EXIST=pkg1") -self.addrule("PKG_EXIST=pkg2") -self.addrule("PKG_VERSION=pkg2|1.0-2") diff --git a/pactest/tests/conflict002.py b/pactest/tests/conflict002.py deleted file mode 100644 index 2e326f52..00000000 --- a/pactest/tests/conflict002.py +++ /dev/null @@ -1,13 +0,0 @@ -self.description = "conflict with version (conflict)" - -p = pmpkg("pkg1") -p.conflicts = ["pkg2<=1.0-2"] -self.addpkg(p); - -lp = pmpkg("pkg2", "1.0-1") -self.addpkg2db("local", lp) - -self.args = "-A %s" % p.filename() -self.addrule("PACMAN_RETCODE=1") -self.addrule("!PKG_EXIST=pkg1") -self.addrule("PKG_EXIST=pkg2") diff --git a/pactest/tests/conflict003.py b/pactest/tests/conflict003.py deleted file mode 100644 index 7205086a..00000000 --- a/pactest/tests/conflict003.py +++ /dev/null @@ -1,13 +0,0 @@ -self.description = "conflict with version (no conflict)" - -p = pmpkg("pkg1") -p.conflicts = ["pkg2=1.0-2"] -self.addpkg(p); - -lp = pmpkg("pkg2", "1.0-1") -self.addpkg2db("local", lp) - -self.args = "-A %s" % p.filename() -self.addrule("PACMAN_RETCODE=0") -self.addrule("PKG_EXIST=pkg1") -self.addrule("PKG_EXIST=pkg2") diff --git a/pactest/tests/conflict004.py b/pactest/tests/conflict004.py deleted file mode 100644 index 948017d9..00000000 --- a/pactest/tests/conflict004.py +++ /dev/null @@ -1,15 +0,0 @@ -self.description = "a package conflicts with itself" - -sp1 = pmpkg("pkg1") -sp1.conflicts = ["pkg1"] -self.addpkg2db("sync", sp1); - -sp2 = pmpkg("pkg2", "1.0-2") -self.addpkg2db("sync", sp2) - -self.args = "-S %s" % " ".join([p.name for p in sp1, sp2]) - -self.addrule("PACMAN_RETCODE=0") -self.addrule("PKG_EXIST=pkg1") -self.addrule("PKG_EXIST=pkg2") -self.addrule("PKG_VERSION=pkg2|1.0-2") diff --git a/pactest/tests/conflict005.py b/pactest/tests/conflict005.py deleted file mode 100644 index 8aca9a0a..00000000 --- a/pactest/tests/conflict005.py +++ /dev/null @@ -1,20 +0,0 @@ -self.description = "Fileconflict with symlinks" - -lp = pmpkg("dummy") -lp.files = ["dir/realdir/", - "dir/symdir -> realdir"] -self.addpkg2db("local", lp) - -p1 = pmpkg("pkg1") -p1.files = ["dir/realdir/file"] -self.addpkg(p1) - -p2 = pmpkg("pkg2") -p2.files = ["dir/symdir/file"] -self.addpkg(p2) - -self.args = "-A %s" % " ".join([p.filename() for p in p1, p2]) - -self.addrule("PACMAN_RETCODE=1") -self.addrule("!PKG_EXIST=pkg1") -self.addrule("!PKG_EXIST=pkg2") diff --git a/pactest/tests/conflict006.py b/pactest/tests/conflict006.py deleted file mode 100644 index 43899f04..00000000 --- a/pactest/tests/conflict006.py +++ /dev/null @@ -1,17 +0,0 @@ -self.description = "Fileconflict with symlinks (2)" - -p1 = pmpkg("pkg1") -p1.files = ["dir/realdir/file", - "dir/symdir -> realdir"] -self.addpkg(p1) - -p2 = pmpkg("pkg2") -p2.files = ["dir/symdir/file"] -self.addpkg(p2) - -self.args = "-A %s" % " ".join([p.filename() for p in p1, p2]) - -self.addrule("PACMAN_RETCODE=1") -self.addrule("!PKG_EXIST=pkg1") -self.addrule("!PKG_EXIST=pkg2") - diff --git a/pactest/tests/depconflict100.py b/pactest/tests/depconflict100.py new file mode 100644 index 00000000..948017d9 --- /dev/null +++ b/pactest/tests/depconflict100.py @@ -0,0 +1,15 @@ +self.description = "a package conflicts with itself" + +sp1 = pmpkg("pkg1") +sp1.conflicts = ["pkg1"] +self.addpkg2db("sync", sp1); + +sp2 = pmpkg("pkg2", "1.0-2") +self.addpkg2db("sync", sp2) + +self.args = "-S %s" % " ".join([p.name for p in sp1, sp2]) + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PKG_EXIST=pkg1") +self.addrule("PKG_EXIST=pkg2") +self.addrule("PKG_VERSION=pkg2|1.0-2") diff --git a/pactest/tests/depconflict110.py b/pactest/tests/depconflict110.py new file mode 100644 index 00000000..2e326f52 --- /dev/null +++ b/pactest/tests/depconflict110.py @@ -0,0 +1,13 @@ +self.description = "conflict with version (conflict)" + +p = pmpkg("pkg1") +p.conflicts = ["pkg2<=1.0-2"] +self.addpkg(p); + +lp = pmpkg("pkg2", "1.0-1") +self.addpkg2db("local", lp) + +self.args = "-A %s" % p.filename() +self.addrule("PACMAN_RETCODE=1") +self.addrule("!PKG_EXIST=pkg1") +self.addrule("PKG_EXIST=pkg2") diff --git a/pactest/tests/depconflict111.py b/pactest/tests/depconflict111.py new file mode 100644 index 00000000..6f95733b --- /dev/null +++ b/pactest/tests/depconflict111.py @@ -0,0 +1,13 @@ +self.description = "conflict with version (no conflict)" + +p = pmpkg("pkg1") +p.conflicts = ["pkg2=1.0-2"] +self.addpkg(p); + +lp = pmpkg("pkg2", "1.0-1") +self.addpkg2db("local", lp) + +self.args = "-A %s" % p.filename() +self.addrule("PACMAN_RETCODE=0") +self.addrule("PKG_EXIST=pkg1") +self.addrule("PKG_EXIST=pkg2") diff --git a/pactest/tests/depconflict120.py b/pactest/tests/depconflict120.py new file mode 100644 index 00000000..a9f3f6b3 --- /dev/null +++ b/pactest/tests/depconflict120.py @@ -0,0 +1,19 @@ +self.description = "target vs db conflict will disappear after upgrade" + +sp1 = pmpkg("pkg1") +sp1.conflicts = ["imaginary"] +self.addpkg2db("sync", sp1); + +sp2 = pmpkg("pkg2", "1.0-2") +self.addpkg2db("sync", sp2) + +lp = pmpkg("pkg2", "1.0-1") +lp.provides = ["imaginary"] +self.addpkg2db("local", lp) + +self.args = "-S %s" % " ".join([p.name for p in sp1, sp2]) + +self.addrule("PACMAN_RETCODE=0") +self.addrule("PKG_EXIST=pkg1") +self.addrule("PKG_EXIST=pkg2") +self.addrule("PKG_VERSION=pkg2|1.0-2") diff --git a/pactest/tests/fileconflict001.py b/pactest/tests/fileconflict001.py new file mode 100644 index 00000000..8aca9a0a --- /dev/null +++ b/pactest/tests/fileconflict001.py @@ -0,0 +1,20 @@ +self.description = "Fileconflict with symlinks" + +lp = pmpkg("dummy") +lp.files = ["dir/realdir/", + "dir/symdir -> realdir"] +self.addpkg2db("local", lp) + +p1 = pmpkg("pkg1") +p1.files = ["dir/realdir/file"] +self.addpkg(p1) + +p2 = pmpkg("pkg2") +p2.files = ["dir/symdir/file"] +self.addpkg(p2) + +self.args = "-A %s" % " ".join([p.filename() for p in p1, p2]) + +self.addrule("PACMAN_RETCODE=1") +self.addrule("!PKG_EXIST=pkg1") +self.addrule("!PKG_EXIST=pkg2") diff --git a/pactest/tests/fileconflict002.py b/pactest/tests/fileconflict002.py new file mode 100644 index 00000000..da04e332 --- /dev/null +++ b/pactest/tests/fileconflict002.py @@ -0,0 +1,16 @@ +self.description = "Fileconflict with symlinks (2)" + +p1 = pmpkg("pkg1") +p1.files = ["dir/realdir/file", + "dir/symdir -> realdir"] +self.addpkg(p1) + +p2 = pmpkg("pkg2") +p2.files = ["dir/symdir/file"] +self.addpkg(p2) + +self.args = "-A %s" % " ".join([p.filename() for p in p1, p2]) + +self.addrule("PACMAN_RETCODE=1") +self.addrule("!PKG_EXIST=pkg1") +self.addrule("!PKG_EXIST=pkg2") -- cgit v1.2.3-70-g09d2