test_merge_order: test circular RDEPEND + DEPEND
authorZac Medico <zmedico@gentoo.org>
Sat, 21 May 2011 09:10:57 +0000 (02:10 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 26 May 2011 03:43:56 +0000 (20:43 -0700)
pym/portage/tests/resolver/test_merge_order.py

index 5ec569a243603f9215e50b118f2b69d6a9e4a470..df0c3f13b2ae3889c1e042d3e92e61d5cc2e3741 100644 (file)
@@ -19,6 +19,16 @@ class MergeOrderTestCase(TestCase):
                        },
                        "app-misc/blocker-runtime-a-1" : {},
                        "app-misc/blocker-runtime-hard-a-1" : {},
+                       "app-misc/circ-buildtime-a-0": {},
+                       "app-misc/circ-buildtime-a-1": {
+                               "RDEPEND": "app-misc/circ-buildtime-b",
+                       },
+                       "app-misc/circ-buildtime-b-1": {
+                               "RDEPEND": "app-misc/circ-buildtime-c",
+                       },
+                       "app-misc/circ-buildtime-c-1": {
+                               "DEPEND": "app-misc/circ-buildtime-a",
+                       },
                        "app-misc/circ-post-runtime-a-1": {
                                "PDEPEND": "app-misc/circ-post-runtime-b",
                        },
@@ -48,9 +58,13 @@ class MergeOrderTestCase(TestCase):
                        "app-misc/some-app-b-1": {
                                "RDEPEND": "app-misc/circ-post-runtime-a app-misc/circ-post-runtime-b",
                        },
+                       "app-misc/some-app-c-1": {
+                               "RDEPEND": "app-misc/circ-buildtime-a app-misc/circ-buildtime-b",
+                       },
                }
 
                installed = {
+                       "app-misc/circ-buildtime-a-0": {},
                        "app-misc/installed-blocker-a-1" : {
                                "EAPI"   : "2",
                                "DEPEND" : "!app-misc/blocker-buildtime-a",
@@ -70,6 +84,15 @@ class MergeOrderTestCase(TestCase):
                                ambigous_merge_order = True,
                                mergelist = [("app-misc/circ-runtime-c-1", "app-misc/circ-runtime-b-1", "app-misc/circ-runtime-a-1"), "app-misc/some-app-a-1"]),
                        # Test optimal merge order for a circular dep that is
+                       # RDEPEND in one direction and DEPEND in the other.
+                       # This requires an installed instance of the DEPEND
+                       # package in order to be solvable.
+                       ResolverPlaygroundTestCase(
+                               ["app-misc/some-app-c", "app-misc/circ-buildtime-a"],
+                               success = True,
+                               ambigous_merge_order = True,
+                               mergelist = [("app-misc/circ-buildtime-b-1", "app-misc/circ-buildtime-c-1"), "app-misc/circ-buildtime-a-1", "app-misc/some-app-c-1"]),
+                       # Test optimal merge order for a circular dep that is
                        # RDEPEND in one direction and PDEPEND in the other.
                        ResolverPlaygroundTestCase(
                                ["app-misc/some-app-b"],