From f337eed16b0f9995f6efd825a84a14f34b87adeb Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 25 Sep 2012 19:36:32 -0700 Subject: [PATCH] Test emerge --root-deps. --- pym/portage/tests/resolver/test_targetroot.py | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/pym/portage/tests/resolver/test_targetroot.py b/pym/portage/tests/resolver/test_targetroot.py index a79d2316e..118e6ce3c 100644 --- a/pym/portage/tests/resolver/test_targetroot.py +++ b/pym/portage/tests/resolver/test_targetroot.py @@ -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, -- 2.26.2