summaryrefslogtreecommitdiff
path: root/test/pacman/tests
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2015-09-15 01:08:16 -0400
committerAllan McRae <allan@archlinux.org>2015-09-19 15:12:35 +1000
commit75fe6ef104b1071bf763354177f3c4339c1c7854 (patch)
tree2d09b785e0e2b471e9e0d598e5b46a5774a83034 /test/pacman/tests
parent486643083c853a1d541d6f8e93c68b7a542f5a2d (diff)
sortbydeps: skip local packages being updated
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'test/pacman/tests')
-rw-r--r--test/pacman/tests/TESTS1
-rw-r--r--test/pacman/tests/dependency-cycle-fixed-by-upgrade.py32
2 files changed, 33 insertions, 0 deletions
diff --git a/test/pacman/tests/TESTS b/test/pacman/tests/TESTS
index 3ff0b0c2..cce0d582 100644
--- a/test/pacman/tests/TESTS
+++ b/test/pacman/tests/TESTS
@@ -14,6 +14,7 @@ TESTS += test/pacman/tests/depconflict100.py
TESTS += test/pacman/tests/depconflict110.py
TESTS += test/pacman/tests/depconflict111.py
TESTS += test/pacman/tests/depconflict120.py
+TESTS += test/pacman/tests/dependency-cycle-fixed-by-upgrade.py
TESTS += test/pacman/tests/deptest001.py
TESTS += test/pacman/tests/dummy001.py
TESTS += test/pacman/tests/epoch001.py
diff --git a/test/pacman/tests/dependency-cycle-fixed-by-upgrade.py b/test/pacman/tests/dependency-cycle-fixed-by-upgrade.py
new file mode 100644
index 00000000..dc042e5f
--- /dev/null
+++ b/test/pacman/tests/dependency-cycle-fixed-by-upgrade.py
@@ -0,0 +1,32 @@
+self.description = "Circular dependency fixed by removed dependency"
+
+lp1 = pmpkg("pkg1", "1-1")
+lp1.depends = ["pkg2"]
+
+lp2 = pmpkg("pkg2", "1-1")
+lp2.depends = ["pkg3"]
+
+lp3 = pmpkg("pkg3", "1-1")
+lp3.depends = ["pkg1"]
+
+for p in lp1, lp2, lp3:
+ self.addpkg2db("local", p);
+
+sp1 = pmpkg("pkg1", "1-2")
+sp1.depends = ["pkg2"]
+
+sp2 = pmpkg("pkg2", "1-2")
+
+sp3 = pmpkg("pkg3", "1-2")
+sp3.depends = ["pkg1"]
+
+for p in sp1, sp2, sp3:
+ self.addpkg2db("sync", p);
+
+self.args = "-S %s %s %s" % (sp1.name, sp2.name, sp3.name)
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_VERSION=pkg1|1-2")
+self.addrule("PKG_VERSION=pkg2|1-2")
+self.addrule("PKG_VERSION=pkg3|1-2")
+self.addrule("!PACMAN_OUTPUT=dependency cycle detected")