From: Zac Medico Date: Sat, 21 May 2011 01:00:02 +0000 (-0700) Subject: test_merge_order: test circular RDEPEND + PDEPEND X-Git-Tag: v2.2.0_alpha35~32 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=50a1fcfffbc27df8dfec733a351fbbdee6d8db11;p=portage.git test_merge_order: test circular RDEPEND + PDEPEND --- diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py index ada9e73fd..9c5d1fe3f 100644 --- a/pym/portage/tests/resolver/test_merge_order.py +++ b/pym/portage/tests/resolver/test_merge_order.py @@ -9,6 +9,12 @@ class MergeOrderTestCase(TestCase): def testMergeOrder(self): ebuilds = { + "app-misc/circ-post-runtime-a-1": { + "PDEPEND": "app-misc/circ-post-runtime-b", + }, + "app-misc/circ-post-runtime-b-1": { + "RDEPEND": "app-misc/circ-post-runtime-a", + }, "app-misc/circ-runtime-a-1": { "RDEPEND": "app-misc/circ-runtime-b", }, @@ -18,6 +24,9 @@ class MergeOrderTestCase(TestCase): "app-misc/some-app-a-1": { "RDEPEND": "app-misc/circ-runtime-a app-misc/circ-runtime-b", }, + "app-misc/some-app-b-1": { + "RDEPEND": "app-misc/circ-post-runtime-a app-misc/circ-post-runtime-b", + }, } installed = { @@ -34,6 +43,13 @@ class MergeOrderTestCase(TestCase): success = True, ambigous_merge_order = True, mergelist = [("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 PDEPEND in the other. + ResolverPlaygroundTestCase( + ["app-misc/some-app-a"], + success = True, + ambigous_merge_order = True, + mergelist = ["app-misc/circ-post-runtime-a-1", "app-misc/circ-post-runtime-b-1", "app-misc/some-app-b-1"]), ) playground = ResolverPlayground(ebuilds=ebuilds, installed=installed)