From 64899b4f3bfcce72b487428d36b279454b298c88 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 22 Sep 2011 12:06:18 -0700 Subject: Test direct virtual circular dep for bug #384107. --- .../tests/resolver/test_circular_choices.py | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/pym/portage/tests/resolver/test_circular_choices.py b/pym/portage/tests/resolver/test_circular_choices.py index 57f76b96c..33b730627 100644 --- a/pym/portage/tests/resolver/test_circular_choices.py +++ b/pym/portage/tests/resolver/test_circular_choices.py @@ -30,3 +30,32 @@ class CircularChoicesTestCase(TestCase): self.assertEqual(test_case.test_success, True, test_case.fail_msg) finally: playground.cleanup() + +class VirtualCircularChoicesTestCase(TestCase): + def testDirectVirtualCircularDependency(self): + + # Bug #384107 + self.todo = True + + ebuilds = { + "dev-java/icedtea-6.1.10.3": { "SLOT" : "6", "DEPEND": "virtual/jdk" }, + "dev-java/icedtea6-bin-1.10.3": {}, + "virtual/jdk-1.6.0": { "SLOT" : "1.6", "RDEPEND": "|| ( dev-java/icedtea6-bin =dev-java/icedtea-6* )" }, + } + + test_cases = ( + # Automatically pull in icedtea6-bin to solve a circular dep + ResolverPlaygroundTestCase( + ["dev-java/icedtea"], + mergelist = ["dev-java/icedtea6-bin-1.10.3", "virtual/jdk-1.6.0", "dev-java/icedtea-6.1.10.3"], + success = True, + ), + ) + + playground = ResolverPlayground(ebuilds=ebuilds) + try: + for test_case in test_cases: + playground.run_TestCase(test_case) + self.assertEqual(test_case.test_success, True, test_case.fail_msg) + finally: + playground.cleanup() -- cgit v1.2.3-1-g7c22