Test emerge --root-deps.
authorZac Medico <zmedico@gentoo.org>
Wed, 26 Sep 2012 02:36:32 +0000 (19:36 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 26 Sep 2012 02:36:32 +0000 (19:36 -0700)
pym/portage/tests/resolver/test_targetroot.py

index a79d2316e14809d00a59725918f372c7e13b9323..118e6ce3c2533acdd40229125a8c88da1703d29a 100644 (file)
@@ -12,7 +12,14 @@ class TargetRootTestCase(TestCase):
                                "EAPI": "5-hdepend",
                                "IUSE": "targetroot",
                                "HDEPEND": "targetroot? ( ~dev-lang/python-3.2 )",
-                       }, 
+                       },
+                       "dev-libs/A-1": {
+                               "EAPI": "4",
+                               "DEPEND": "dev-libs/B",
+                               "RDEPEND": "dev-libs/C",
+                       },
+                       "dev-libs/B-1": {},
+                       "dev-libs/C-1": {},
                }
 
                test_cases = (
@@ -21,6 +28,29 @@ class TargetRootTestCase(TestCase):
                                options = {},
                                success = True,
                                mergelist = ["dev-lang/python-3.2", "dev-lang/python-3.2{targetroot}"]),
+                       ResolverPlaygroundTestCase(
+                               ["dev-lang/python"],
+                               options = {"--root-deps": True},
+                               success = True,
+                               mergelist = ["dev-lang/python-3.2", "dev-lang/python-3.2{targetroot}"]),
+                       ResolverPlaygroundTestCase(
+                               ["dev-libs/A"],
+                               options = {},
+                               ambiguous_merge_order = True,
+                               success = True,
+                               mergelist = [("dev-libs/B-1", "dev-libs/C-1{targetroot}"), "dev-libs/A-1{targetroot}"]),
+                       ResolverPlaygroundTestCase(
+                               ["dev-libs/A"],
+                               options = {"--root-deps": True},
+                               ambiguous_merge_order = True,
+                               success = True,
+                               mergelist = [("dev-libs/B-1{targetroot}", "dev-libs/C-1{targetroot}"), "dev-libs/A-1{targetroot}"]),
+                       ResolverPlaygroundTestCase(
+                               ["dev-libs/A"],
+                               options = {"--root-deps": "rdeps"},
+                               ambiguous_merge_order = True,
+                               success = True,
+                               mergelist = [("dev-libs/C-1{targetroot}"), "dev-libs/A-1{targetroot}"]),
                )
 
                playground = ResolverPlayground(ebuilds=ebuilds, targetroot=True,