summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-12-30 23:10:36 -0800
committerZac Medico <zmedico@gentoo.org>2010-12-30 23:10:36 -0800
commit598f070f10abd6ca78d7dc5647c7d1797610b3c3 (patch)
treec58994c72a72cf03c2acc52960bea81659312ff1
parent76fa27a6cff57915fc2125112a45c86f4f6db305 (diff)
downloadportage-598f070f10abd6ca78d7dc5647c7d1797610b3c3.tar.gz
portage-598f070f10abd6ca78d7dc5647c7d1797610b3c3.tar.bz2
portage-598f070f10abd6ca78d7dc5647c7d1797610b3c3.zip
tests: emerge EAPI 4 from master
-rw-r--r--pym/portage/tests/resolver/test_autounmask.py29
-rw-r--r--pym/portage/tests/resolver/test_circular_dependencies.py25
-rw-r--r--pym/portage/tests/resolver/test_eapi.py56
-rw-r--r--pym/portage/tests/resolver/test_required_use.py114
-rw-r--r--pym/portage/tests/resolver/test_slot_collisions.py22
-rw-r--r--pym/portage/tests/resolver/test_use_dep_defaults.py64
6 files changed, 179 insertions, 131 deletions
diff --git a/pym/portage/tests/resolver/test_autounmask.py b/pym/portage/tests/resolver/test_autounmask.py
index ce3ce38f0..50ad85e90 100644
--- a/pym/portage/tests/resolver/test_autounmask.py
+++ b/pym/portage/tests/resolver/test_autounmask.py
@@ -7,6 +7,7 @@ from portage.tests.resolver.ResolverPlayground import ResolverPlayground, Resolv
class AutounmaskTestCase(TestCase):
def testAutounmask(self):
+
ebuilds = {
#ebuilds to test use changes
"dev-libs/A-1": { "SLOT": 1, "DEPEND": "dev-libs/B[foo]", "EAPI": 2},
@@ -42,10 +43,10 @@ class AutounmaskTestCase(TestCase):
"dev-util/R-1": { "IUSE": "bar" },
#ebuilds to test interaction with REQUIRED_USE
- #~ "app-portage/A-1": { "DEPEND": "app-portage/B[foo]", "EAPI": 2 },
- #~ "app-portage/A-2": { "DEPEND": "app-portage/B[foo=]", "IUSE": "+foo", "REQUIRED_USE": "foo", "EAPI": 4 },
-#~
- #~ "app-portage/B-1": { "IUSE": "foo +bar", "REQUIRED_USE": "^^ ( foo bar )", "EAPI": 4 },
+ "app-portage/A-1": { "DEPEND": "app-portage/B[foo]", "EAPI": 2 },
+ "app-portage/A-2": { "DEPEND": "app-portage/B[foo=]", "IUSE": "+foo", "REQUIRED_USE": "foo", "EAPI": "4" },
+
+ "app-portage/B-1": { "IUSE": "foo +bar", "REQUIRED_USE": "^^ ( foo bar )", "EAPI": "4" },
}
test_cases = (
@@ -168,16 +169,16 @@ class AutounmaskTestCase(TestCase):
use_changes = { "dev-util/R-1": { "bar": True } }),
#Test interaction with REQUIRED_USE.
- #~ ResolverPlaygroundTestCase(
- #~ ["=app-portage/A-1"],
- #~ options = { "--autounmask": True },
- #~ use_changes = None,
- #~ success = False),
- #~ ResolverPlaygroundTestCase(
- #~ ["=app-portage/A-2"],
- #~ options = { "--autounmask": True },
- #~ use_changes = None,
- #~ success = False),
+ ResolverPlaygroundTestCase(
+ ["=app-portage/A-1"],
+ options = { "--autounmask": True },
+ use_changes = None,
+ success = False),
+ ResolverPlaygroundTestCase(
+ ["=app-portage/A-2"],
+ options = { "--autounmask": True },
+ use_changes = None,
+ success = False),
)
playground = ResolverPlayground(ebuilds=ebuilds)
diff --git a/pym/portage/tests/resolver/test_circular_dependencies.py b/pym/portage/tests/resolver/test_circular_dependencies.py
index e70298642..513265927 100644
--- a/pym/portage/tests/resolver/test_circular_dependencies.py
+++ b/pym/portage/tests/resolver/test_circular_dependencies.py
@@ -16,6 +16,7 @@ class CircularDependencyTestCase(TestCase):
def testCircularDependency(self):
+
ebuilds = {
"dev-libs/Z-1": { "DEPEND": "foo? ( !bar? ( dev-libs/Y ) )", "IUSE": "+foo bar", "EAPI": 1 },
"dev-libs/Z-2": { "DEPEND": "foo? ( dev-libs/Y ) !bar? ( dev-libs/Y )", "IUSE": "+foo bar", "EAPI": 1 },
@@ -25,10 +26,10 @@ class CircularDependencyTestCase(TestCase):
"dev-libs/W-2": { "DEPEND": "dev-libs/Z[foo=] dev-libs/Y", "IUSE": "+foo", "EAPI": 2 },
"dev-libs/W-3": { "DEPEND": "dev-libs/Z[bar] dev-libs/Y", "EAPI": 2 },
- #~ "app-misc/A-1": { "DEPEND": "foo? ( =app-misc/B-1 )", "IUSE": "+foo bar", "REQUIRED_USE": "^^ ( foo bar )", "EAPI": 4 },
- #~ "app-misc/A-2": { "DEPEND": "foo? ( =app-misc/B-2 ) bar? ( =app-misc/B-2 )", "IUSE": "+foo bar", "REQUIRED_USE": "^^ ( foo bar )", "EAPI": 4 },
- #~ "app-misc/B-1": { "DEPEND": "=app-misc/A-1" },
- #~ "app-misc/B-2": { "DEPEND": "=app-misc/A-2" },
+ "app-misc/A-1": { "DEPEND": "foo? ( =app-misc/B-1 )", "IUSE": "+foo bar", "REQUIRED_USE": "^^ ( foo bar )", "EAPI": "4" },
+ "app-misc/A-2": { "DEPEND": "foo? ( =app-misc/B-2 ) bar? ( =app-misc/B-2 )", "IUSE": "+foo bar", "REQUIRED_USE": "^^ ( foo bar )", "EAPI": "4" },
+ "app-misc/B-1": { "DEPEND": "=app-misc/A-1" },
+ "app-misc/B-2": { "DEPEND": "=app-misc/A-2" },
}
test_cases = (
@@ -65,14 +66,14 @@ class CircularDependencyTestCase(TestCase):
success = False),
#Conflict with REQUIRED_USE
- #~ ResolverPlaygroundTestCase(
- #~ ["=app-misc/B-1"],
- #~ circular_dependency_solutions = { "app-misc/B-1": frozenset([frozenset([("foo", False), ("bar", True)])])},
- #~ success = False),
- #~ ResolverPlaygroundTestCase(
- #~ ["=app-misc/B-2"],
- #~ circular_dependency_solutions = {},
- #~ success = False),
+ ResolverPlaygroundTestCase(
+ ["=app-misc/B-1"],
+ circular_dependency_solutions = { "app-misc/B-1": frozenset([frozenset([("foo", False), ("bar", True)])])},
+ success = False),
+ ResolverPlaygroundTestCase(
+ ["=app-misc/B-2"],
+ circular_dependency_solutions = {},
+ success = False),
)
playground = ResolverPlayground(ebuilds=ebuilds)
diff --git a/pym/portage/tests/resolver/test_eapi.py b/pym/portage/tests/resolver/test_eapi.py
index 65dd0108b..525b58532 100644
--- a/pym/portage/tests/resolver/test_eapi.py
+++ b/pym/portage/tests/resolver/test_eapi.py
@@ -7,55 +7,56 @@ from portage.tests.resolver.ResolverPlayground import ResolverPlayground, Resolv
class EAPITestCase(TestCase):
def testEAPI(self):
+
ebuilds = {
#EAPI-1: IUSE-defaults
"dev-libs/A-1.0": { "EAPI": 0, "IUSE": "+foo" },
"dev-libs/A-1.1": { "EAPI": 1, "IUSE": "+foo" },
"dev-libs/A-1.2": { "EAPI": 2, "IUSE": "+foo" },
"dev-libs/A-1.3": { "EAPI": 3, "IUSE": "+foo" },
- #~ "dev-libs/A-1.4": { "EAPI": 4, "IUSE": "+foo" },
+ "dev-libs/A-1.4": { "EAPI": "4", "IUSE": "+foo" },
#EAPI-1: slot deps
"dev-libs/A-2.0": { "EAPI": 0, "DEPEND": "dev-libs/B:0" },
"dev-libs/A-2.1": { "EAPI": 1, "DEPEND": "dev-libs/B:0" },
"dev-libs/A-2.2": { "EAPI": 2, "DEPEND": "dev-libs/B:0" },
"dev-libs/A-2.3": { "EAPI": 3, "DEPEND": "dev-libs/B:0" },
- #~ "dev-libs/A-2.4": { "EAPI": 4, "DEPEND": "dev-libs/B:0" },
+ "dev-libs/A-2.4": { "EAPI": "4", "DEPEND": "dev-libs/B:0" },
#EAPI-2: use deps
"dev-libs/A-3.0": { "EAPI": 0, "DEPEND": "dev-libs/B[foo]" },
"dev-libs/A-3.1": { "EAPI": 1, "DEPEND": "dev-libs/B[foo]" },
"dev-libs/A-3.2": { "EAPI": 2, "DEPEND": "dev-libs/B[foo]" },
"dev-libs/A-3.3": { "EAPI": 3, "DEPEND": "dev-libs/B[foo]" },
- #~ "dev-libs/A-3.4": { "EAPI": 4, "DEPEND": "dev-libs/B[foo]" },
+ "dev-libs/A-3.4": { "EAPI": "4", "DEPEND": "dev-libs/B[foo]" },
#EAPI-2: strong blocks
"dev-libs/A-4.0": { "EAPI": 0, "DEPEND": "!!dev-libs/B" },
"dev-libs/A-4.1": { "EAPI": 1, "DEPEND": "!!dev-libs/B" },
"dev-libs/A-4.2": { "EAPI": 2, "DEPEND": "!!dev-libs/B" },
"dev-libs/A-4.3": { "EAPI": 3, "DEPEND": "!!dev-libs/B" },
- #~ "dev-libs/A-4.4": { "EAPI": 4, "DEPEND": "!!dev-libs/B" },
+ "dev-libs/A-4.4": { "EAPI": "4", "DEPEND": "!!dev-libs/B" },
#EAPI-4: slot operator deps
#~ "dev-libs/A-5.0": { "EAPI": 0, "DEPEND": "dev-libs/B:*" },
#~ "dev-libs/A-5.1": { "EAPI": 1, "DEPEND": "dev-libs/B:*" },
#~ "dev-libs/A-5.2": { "EAPI": 2, "DEPEND": "dev-libs/B:*" },
#~ "dev-libs/A-5.3": { "EAPI": 3, "DEPEND": "dev-libs/B:*" },
- #~ "dev-libs/A-5.4": { "EAPI": 4, "DEPEND": "dev-libs/B:*" },
-
- #EAPI-4: slot operator deps
- #~ "dev-libs/A-6.0": { "EAPI": 0, "DEPEND": "dev-libs/B[bar(+)]" },
- #~ "dev-libs/A-6.1": { "EAPI": 1, "DEPEND": "dev-libs/B[bar(+)]" },
- #~ "dev-libs/A-6.2": { "EAPI": 2, "DEPEND": "dev-libs/B[bar(+)]" },
- #~ "dev-libs/A-6.3": { "EAPI": 3, "DEPEND": "dev-libs/B[bar(+)]" },
- #~ "dev-libs/A-6.4": { "EAPI": 4, "DEPEND": "dev-libs/B[bar(+)]" },
+ #~ "dev-libs/A-5.4": { "EAPI": "4", "DEPEND": "dev-libs/B:*" },
+
+ #EAPI-4: use dep defaults
+ "dev-libs/A-6.0": { "EAPI": 0, "DEPEND": "dev-libs/B[bar(+)]" },
+ "dev-libs/A-6.1": { "EAPI": 1, "DEPEND": "dev-libs/B[bar(+)]" },
+ "dev-libs/A-6.2": { "EAPI": 2, "DEPEND": "dev-libs/B[bar(+)]" },
+ "dev-libs/A-6.3": { "EAPI": 3, "DEPEND": "dev-libs/B[bar(+)]" },
+ "dev-libs/A-6.4": { "EAPI": "4", "DEPEND": "dev-libs/B[bar(+)]" },
#EAPI-4: REQUIRED_USE
"dev-libs/A-7.0": { "EAPI": 0, "IUSE": "foo bar", "REQUIRED_USE": "|| ( foo bar )" },
"dev-libs/A-7.1": { "EAPI": 1, "IUSE": "foo +bar", "REQUIRED_USE": "|| ( foo bar )" },
"dev-libs/A-7.2": { "EAPI": 2, "IUSE": "foo +bar", "REQUIRED_USE": "|| ( foo bar )" },
"dev-libs/A-7.3": { "EAPI": 3, "IUSE": "foo +bar", "REQUIRED_USE": "|| ( foo bar )" },
- #~ "dev-libs/A-7.4": { "EAPI": 4, "IUSE": "foo +bar", "REQUIRED_USE": "|| ( foo bar )" },
+ "dev-libs/A-7.4": { "EAPI": "4", "IUSE": "foo +bar", "REQUIRED_USE": "|| ( foo bar )" },
"dev-libs/B-1": {"EAPI": 1, "IUSE": "+foo"},
}
@@ -65,43 +66,44 @@ class EAPITestCase(TestCase):
ResolverPlaygroundTestCase(["=dev-libs/A-1.1"], success = True, mergelist = ["dev-libs/A-1.1"]),
ResolverPlaygroundTestCase(["=dev-libs/A-1.2"], success = True, mergelist = ["dev-libs/A-1.2"]),
ResolverPlaygroundTestCase(["=dev-libs/A-1.3"], success = True, mergelist = ["dev-libs/A-1.3"]),
- #~ ResolverPlaygroundTestCase(["=dev-libs/A-1.4"], success = True, mergelist = ["dev-libs/A-1.4"]),
+ ResolverPlaygroundTestCase(["=dev-libs/A-1.4"], success = True, mergelist = ["dev-libs/A-1.4"]),
ResolverPlaygroundTestCase(["=dev-libs/A-2.0"], success = False),
ResolverPlaygroundTestCase(["=dev-libs/A-2.1"], success = True, mergelist = ["dev-libs/B-1", "dev-libs/A-2.1"]),
ResolverPlaygroundTestCase(["=dev-libs/A-2.2"], success = True, mergelist = ["dev-libs/B-1", "dev-libs/A-2.2"]),
ResolverPlaygroundTestCase(["=dev-libs/A-2.3"], success = True, mergelist = ["dev-libs/B-1", "dev-libs/A-2.3"]),
- #~ ResolverPlaygroundTestCase(["=dev-libs/A-2.4"], success = True, mergelist = ["dev-libs/B-1", "dev-libs/A-2.4"]),
+ ResolverPlaygroundTestCase(["=dev-libs/A-2.4"], success = True, mergelist = ["dev-libs/B-1", "dev-libs/A-2.4"]),
ResolverPlaygroundTestCase(["=dev-libs/A-3.0"], success = False),
ResolverPlaygroundTestCase(["=dev-libs/A-3.1"], success = False),
ResolverPlaygroundTestCase(["=dev-libs/A-3.2"], success = True, mergelist = ["dev-libs/B-1", "dev-libs/A-3.2"]),
ResolverPlaygroundTestCase(["=dev-libs/A-3.3"], success = True, mergelist = ["dev-libs/B-1", "dev-libs/A-3.3"]),
- #~ ResolverPlaygroundTestCase(["=dev-libs/A-3.4"], success = True, mergelist = ["dev-libs/B-1", "dev-libs/A-3.4"]),
+ ResolverPlaygroundTestCase(["=dev-libs/A-3.4"], success = True, mergelist = ["dev-libs/B-1", "dev-libs/A-3.4"]),
ResolverPlaygroundTestCase(["=dev-libs/A-4.0"], success = False),
ResolverPlaygroundTestCase(["=dev-libs/A-4.1"], success = False),
ResolverPlaygroundTestCase(["=dev-libs/A-4.2"], success = True, mergelist = ["dev-libs/A-4.2"]),
ResolverPlaygroundTestCase(["=dev-libs/A-4.3"], success = True, mergelist = ["dev-libs/A-4.3"]),
- #~ ResolverPlaygroundTestCase(["=dev-libs/A-4.4"], success = True, mergelist = ["dev-libs/A-4.4"]),
+ ResolverPlaygroundTestCase(["=dev-libs/A-4.4"], success = True, mergelist = ["dev-libs/A-4.4"]),
- #~ ResolverPlaygroundTestCase(["=dev-libs/A-5.0"], success = False),
- #~ ResolverPlaygroundTestCase(["=dev-libs/A-5.1"], success = False),
- #~ ResolverPlaygroundTestCase(["=dev-libs/A-5.2"], success = False),
- #~ ResolverPlaygroundTestCase(["=dev-libs/A-5.3"], success = False),
+ ResolverPlaygroundTestCase(["=dev-libs/A-5.0"], success = False),
+ ResolverPlaygroundTestCase(["=dev-libs/A-5.1"], success = False),
+ ResolverPlaygroundTestCase(["=dev-libs/A-5.2"], success = False),
+ ResolverPlaygroundTestCase(["=dev-libs/A-5.3"], success = False),
+ # not implemented: EAPI-4: slot operator deps
#~ ResolverPlaygroundTestCase(["=dev-libs/A-5.4"], success = True, mergelist = ["dev-libs/B-1", "dev-libs/A-5.4"]),
- #~ ResolverPlaygroundTestCase(["=dev-libs/A-6.0"], success = False),
- #~ ResolverPlaygroundTestCase(["=dev-libs/A-6.1"], success = False),
- #~ ResolverPlaygroundTestCase(["=dev-libs/A-6.2"], success = False),
- #~ ResolverPlaygroundTestCase(["=dev-libs/A-6.3"], success = False),
- #~ ResolverPlaygroundTestCase(["=dev-libs/A-6.4"], success = True, mergelist = ["dev-libs/B-1", "dev-libs/A-6.4"]),
+ ResolverPlaygroundTestCase(["=dev-libs/A-6.0"], success = False),
+ ResolverPlaygroundTestCase(["=dev-libs/A-6.1"], success = False),
+ ResolverPlaygroundTestCase(["=dev-libs/A-6.2"], success = False),
+ ResolverPlaygroundTestCase(["=dev-libs/A-6.3"], success = False),
+ ResolverPlaygroundTestCase(["=dev-libs/A-6.4"], success = True, mergelist = ["dev-libs/B-1", "dev-libs/A-6.4"]),
ResolverPlaygroundTestCase(["=dev-libs/A-7.0"], success = False),
ResolverPlaygroundTestCase(["=dev-libs/A-7.1"], success = False),
ResolverPlaygroundTestCase(["=dev-libs/A-7.2"], success = False),
ResolverPlaygroundTestCase(["=dev-libs/A-7.3"], success = False),
- #~ ResolverPlaygroundTestCase(["=dev-libs/A-7.4"], success = True, mergelist = ["dev-libs/A-7.4"]),
+ ResolverPlaygroundTestCase(["=dev-libs/A-7.4"], success = True, mergelist = ["dev-libs/A-7.4"]),
)
playground = ResolverPlayground(ebuilds=ebuilds)
diff --git a/pym/portage/tests/resolver/test_required_use.py b/pym/portage/tests/resolver/test_required_use.py
index 6835b33c7..90ccb3da0 100644
--- a/pym/portage/tests/resolver/test_required_use.py
+++ b/pym/portage/tests/resolver/test_required_use.py
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
from portage.tests import TestCase
-#from portage.tests.resolver.ResolverPlayground import ResolverPlayground, ResolverPlaygroundTestCase
+from portage.tests.resolver.ResolverPlayground import ResolverPlayground, ResolverPlaygroundTestCase
class RequiredUSETestCase(TestCase):
@@ -10,37 +10,81 @@ class RequiredUSETestCase(TestCase):
"""
Only simple REQUIRED_USE values here. The parser is tested under in dep/testCheckRequiredUse
"""
- #Disabled until we have EAPI-4
- pass
-
- #~ ebuilds = {
- #~ "dev-libs/A-1": {"EAPI": 4, "IUSE": "foo bar", "REQUIRED_USE": "|| ( foo bar )"},
- #~ "dev-libs/A-2": {"EAPI": 4, "IUSE": "foo +bar", "REQUIRED_USE": "|| ( foo bar )"},
- #~ "dev-libs/A-3": {"EAPI": 4, "IUSE": "+foo bar", "REQUIRED_USE": "|| ( foo bar )"},
- #~ "dev-libs/A-4": {"EAPI": 4, "IUSE": "+foo +bar", "REQUIRED_USE": "|| ( foo bar )"},
-#~
- #~ "dev-libs/B-1": {"EAPI": 4, "IUSE": "foo bar", "REQUIRED_USE": "^^ ( foo bar )"},
- #~ "dev-libs/B-2": {"EAPI": 4, "IUSE": "foo +bar", "REQUIRED_USE": "^^ ( foo bar )"},
- #~ "dev-libs/B-3": {"EAPI": 4, "IUSE": "+foo bar", "REQUIRED_USE": "^^ ( foo bar )"},
- #~ "dev-libs/B-4": {"EAPI": 4, "IUSE": "+foo +bar", "REQUIRED_USE": "^^ ( foo bar )"},
- #~ }
-#~
- #~ test_cases = (
- #~ ResolverPlaygroundTestCase(["=dev-libs/A-1"], success = False),
- #~ ResolverPlaygroundTestCase(["=dev-libs/A-2"], success = True, mergelist=["dev-libs/A-2"]),
- #~ ResolverPlaygroundTestCase(["=dev-libs/A-3"], success = True, mergelist=["dev-libs/A-3"]),
- #~ ResolverPlaygroundTestCase(["=dev-libs/A-4"], success = True, mergelist=["dev-libs/A-4"]),
-#~
- #~ ResolverPlaygroundTestCase(["=dev-libs/B-1"], success = False),
- #~ ResolverPlaygroundTestCase(["=dev-libs/B-2"], success = True, mergelist=["dev-libs/B-2"]),
- #~ ResolverPlaygroundTestCase(["=dev-libs/B-3"], success = True, mergelist=["dev-libs/B-3"]),
- #~ ResolverPlaygroundTestCase(["=dev-libs/B-4"], success = False),
- #~ )
-#~
- #~ 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()
+
+ ebuilds = {
+ "dev-libs/A-1" : {"EAPI": "4", "IUSE": "foo bar", "REQUIRED_USE": "|| ( foo bar )"},
+ "dev-libs/A-2" : {"EAPI": "4", "IUSE": "foo +bar", "REQUIRED_USE": "|| ( foo bar )"},
+ "dev-libs/A-3" : {"EAPI": "4", "IUSE": "+foo bar", "REQUIRED_USE": "|| ( foo bar )"},
+ "dev-libs/A-4" : {"EAPI": "4", "IUSE": "+foo +bar", "REQUIRED_USE": "|| ( foo bar )"},
+ "dev-libs/A-5" : {"EAPI": "4", "IUSE": "+foo +bar", "REQUIRED_USE": "|| ( )"},
+
+ "dev-libs/B-1" : {"EAPI": "4", "IUSE": "foo bar", "REQUIRED_USE": "^^ ( foo bar )"},
+ "dev-libs/B-2" : {"EAPI": "4", "IUSE": "foo +bar", "REQUIRED_USE": "^^ ( foo bar )"},
+ "dev-libs/B-3" : {"EAPI": "4", "IUSE": "+foo bar", "REQUIRED_USE": "^^ ( foo bar )"},
+ "dev-libs/B-4" : {"EAPI": "4", "IUSE": "+foo +bar", "REQUIRED_USE": "^^ ( foo bar )"},
+ "dev-libs/B-5" : {"EAPI": "4", "IUSE": "+foo +bar", "REQUIRED_USE": "^^ ( )"},
+
+ "dev-libs/C-1" : {"EAPI": "4", "IUSE": "+foo bar", "REQUIRED_USE": "foo? ( !bar )"},
+ "dev-libs/C-2" : {"EAPI": "4", "IUSE": "+foo +bar", "REQUIRED_USE": "foo? ( !bar )"},
+ "dev-libs/C-3" : {"EAPI": "4", "IUSE": "+foo +bar", "REQUIRED_USE": "foo? ( bar )"},
+ "dev-libs/C-4" : {"EAPI": "4", "IUSE": "+foo bar", "REQUIRED_USE": "foo? ( bar )"},
+ "dev-libs/C-5" : {"EAPI": "4", "IUSE": "foo bar", "REQUIRED_USE": "foo? ( bar )"},
+ "dev-libs/C-6" : {"EAPI": "4", "IUSE": "foo +bar", "REQUIRED_USE": "foo? ( bar )"},
+ "dev-libs/C-7" : {"EAPI": "4", "IUSE": "foo +bar", "REQUIRED_USE": "!foo? ( bar )"},
+ "dev-libs/C-8" : {"EAPI": "4", "IUSE": "+foo +bar", "REQUIRED_USE": "!foo? ( bar )"},
+ "dev-libs/C-9" : {"EAPI": "4", "IUSE": "+foo bar", "REQUIRED_USE": "!foo? ( bar )"},
+ "dev-libs/C-10": {"EAPI": "4", "IUSE": "foo bar", "REQUIRED_USE": "!foo? ( bar )"},
+ "dev-libs/C-11": {"EAPI": "4", "IUSE": "foo bar", "REQUIRED_USE": "!foo? ( !bar )"},
+ "dev-libs/C-12": {"EAPI": "4", "IUSE": "foo +bar", "REQUIRED_USE": "!foo? ( !bar )"},
+ "dev-libs/C-13": {"EAPI": "4", "IUSE": "+foo +bar", "REQUIRED_USE": "!foo? ( !bar )"},
+ "dev-libs/C-14": {"EAPI": "4", "IUSE": "+foo bar", "REQUIRED_USE": "!foo? ( !bar )"},
+
+ "dev-libs/D-1" : {"EAPI": "4", "IUSE": "+w +x +y z", "REQUIRED_USE": "w? ( x || ( y z ) )"},
+ "dev-libs/D-2" : {"EAPI": "4", "IUSE": "+w +x +y +z", "REQUIRED_USE": "w? ( x || ( y z ) )"},
+ "dev-libs/D-3" : {"EAPI": "4", "IUSE": "+w +x y z", "REQUIRED_USE": "w? ( x || ( y z ) )"},
+ "dev-libs/D-4" : {"EAPI": "4", "IUSE": "+w x +y +z", "REQUIRED_USE": "w? ( x || ( y z ) )"},
+ "dev-libs/D-5" : {"EAPI": "4", "IUSE": "w x y z", "REQUIRED_USE": "w? ( x || ( y z ) )"},
+ }
+
+ test_cases = (
+ ResolverPlaygroundTestCase(["=dev-libs/A-1"], success = False),
+ ResolverPlaygroundTestCase(["=dev-libs/A-2"], success = True, mergelist=["dev-libs/A-2"]),
+ ResolverPlaygroundTestCase(["=dev-libs/A-3"], success = True, mergelist=["dev-libs/A-3"]),
+ ResolverPlaygroundTestCase(["=dev-libs/A-4"], success = True, mergelist=["dev-libs/A-4"]),
+ ResolverPlaygroundTestCase(["=dev-libs/A-5"], success = True, mergelist=["dev-libs/A-5"]),
+
+ ResolverPlaygroundTestCase(["=dev-libs/B-1"], success = False),
+ ResolverPlaygroundTestCase(["=dev-libs/B-2"], success = True, mergelist=["dev-libs/B-2"]),
+ ResolverPlaygroundTestCase(["=dev-libs/B-3"], success = True, mergelist=["dev-libs/B-3"]),
+ ResolverPlaygroundTestCase(["=dev-libs/B-4"], success = False),
+ ResolverPlaygroundTestCase(["=dev-libs/B-5"], success = True, mergelist=["dev-libs/B-5"]),
+
+ ResolverPlaygroundTestCase(["=dev-libs/C-1"], success = True, mergelist=["dev-libs/C-1"]),
+ ResolverPlaygroundTestCase(["=dev-libs/C-2"], success = False),
+ ResolverPlaygroundTestCase(["=dev-libs/C-3"], success = True, mergelist=["dev-libs/C-3"]),
+ ResolverPlaygroundTestCase(["=dev-libs/C-4"], success = False),
+ ResolverPlaygroundTestCase(["=dev-libs/C-5"], success = True, mergelist=["dev-libs/C-5"]),
+ ResolverPlaygroundTestCase(["=dev-libs/C-6"], success = True, mergelist=["dev-libs/C-6"]),
+ ResolverPlaygroundTestCase(["=dev-libs/C-7"], success = True, mergelist=["dev-libs/C-7"]),
+ ResolverPlaygroundTestCase(["=dev-libs/C-8"], success = True, mergelist=["dev-libs/C-8"]),
+ ResolverPlaygroundTestCase(["=dev-libs/C-9"], success = True, mergelist=["dev-libs/C-9"]),
+ ResolverPlaygroundTestCase(["=dev-libs/C-10"], success = False),
+ ResolverPlaygroundTestCase(["=dev-libs/C-11"], success = True, mergelist=["dev-libs/C-11"]),
+ ResolverPlaygroundTestCase(["=dev-libs/C-12"], success = False),
+ ResolverPlaygroundTestCase(["=dev-libs/C-13"], success = True, mergelist=["dev-libs/C-13"]),
+ ResolverPlaygroundTestCase(["=dev-libs/C-14"], success = True, mergelist=["dev-libs/C-14"]),
+
+ ResolverPlaygroundTestCase(["=dev-libs/D-1"], success = True, mergelist=["dev-libs/D-1"]),
+ ResolverPlaygroundTestCase(["=dev-libs/D-2"], success = True, mergelist=["dev-libs/D-2"]),
+ ResolverPlaygroundTestCase(["=dev-libs/D-3"], success = False),
+ ResolverPlaygroundTestCase(["=dev-libs/D-4"], success = False),
+ ResolverPlaygroundTestCase(["=dev-libs/D-5"], success = True, mergelist=["dev-libs/D-5"]),
+ )
+
+ 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()
diff --git a/pym/portage/tests/resolver/test_slot_collisions.py b/pym/portage/tests/resolver/test_slot_collisions.py
index 348a06664..6f61c6c31 100644
--- a/pym/portage/tests/resolver/test_slot_collisions.py
+++ b/pym/portage/tests/resolver/test_slot_collisions.py
@@ -27,9 +27,9 @@ class SlotCollisionTestCase(TestCase):
"sci-libs/L-1": { "DEPEND": "sci-libs/K[-foo]", "EAPI": 2 },
"sci-libs/M-1": { "DEPEND": "sci-libs/K[foo=]", "IUSE": "+foo", "EAPI": 2 },
- #~ "app-misc/A-1": { "IUSE": "foo +bar", "REQUIRED_USE": "^^ ( foo bar )", "EAPI": 4 },
- #~ "app-misc/B-1": { "DEPEND": "=app-misc/A-1[foo=]", "IUSE": "foo", "EAPI": 2 },
- #~ "app-misc/C-1": { "DEPEND": "=app-misc/A-1[foo]", "EAPI": 2 },
+ "app-misc/A-1": { "IUSE": "foo +bar", "REQUIRED_USE": "^^ ( foo bar )", "EAPI": "4" },
+ "app-misc/B-1": { "DEPEND": "=app-misc/A-1[foo=]", "IUSE": "foo", "EAPI": 2 },
+ "app-misc/C-1": { "DEPEND": "=app-misc/A-1[foo]", "EAPI": 2 },
"app-misc/E-1": { "RDEPEND": "dev-libs/E[foo?]", "IUSE": "foo", "EAPI": "2" },
"app-misc/F-1": { "RDEPEND": "=dev-libs/E-1", "IUSE": "foo", "EAPI": "2" },
}
@@ -42,7 +42,7 @@ class SlotCollisionTestCase(TestCase):
"sci-libs/K-1": { "IUSE": "foo", "USE": "" },
"sci-libs/L-1": { "DEPEND": "sci-libs/K[-foo]" },
- #~ "app-misc/A-1": { "IUSE": "+foo bar", "USE": "foo", "REQUIRED_USE": "^^ ( foo bar )", "EAPI": 4 },
+ "app-misc/A-1": { "IUSE": "+foo bar", "USE": "foo", "REQUIRED_USE": "^^ ( foo bar )", "EAPI": "4" },
}
test_cases = (
@@ -88,13 +88,13 @@ class SlotCollisionTestCase(TestCase):
),
#Conflict with REQUIRED_USE
- #~ ResolverPlaygroundTestCase(
- #~ ["=app-misc/C-1", "=app-misc/B-1"],
- #~ all_permutations = True,
- #~ slot_collision_solutions = [],
- #~ mergelist = ["app-misc/A-1", "app-misc/C-1", "app-misc/B-1"],
- #~ ignore_mergelist_order = True,
- #~ success = False),
+ ResolverPlaygroundTestCase(
+ ["=app-misc/C-1", "=app-misc/B-1"],
+ all_permutations = True,
+ slot_collision_solutions = [],
+ mergelist = ["app-misc/A-1", "app-misc/C-1", "app-misc/B-1"],
+ ignore_mergelist_order = True,
+ success = False),
)
playground = ResolverPlayground(ebuilds=ebuilds, installed=installed)
diff --git a/pym/portage/tests/resolver/test_use_dep_defaults.py b/pym/portage/tests/resolver/test_use_dep_defaults.py
index 0ddcd3836..7d171066e 100644
--- a/pym/portage/tests/resolver/test_use_dep_defaults.py
+++ b/pym/portage/tests/resolver/test_use_dep_defaults.py
@@ -2,39 +2,39 @@
# Distributed under the terms of the GNU General Public License v2
from portage.tests import TestCase
-#from portage.tests.resolver.ResolverPlayground import ResolverPlayground, ResolverPlaygroundTestCase
+from portage.tests.resolver.ResolverPlayground import ResolverPlayground, ResolverPlaygroundTestCase
class UseDepDefaultsTestCase(TestCase):
def testUseDepDefaultse(self):
- pass
- #~ ebuilds = {
- #~ "dev-libs/A-1": { "DEPEND": "dev-libs/B[foo]", "RDEPEND": "dev-libs/B[foo]", "EAPI": 2 },
- #~ "dev-libs/A-2": { "DEPEND": "dev-libs/B[foo(+)]", "RDEPEND": "dev-libs/B[foo(+)]", "EAPI": 4 },
- #~ "dev-libs/A-3": { "DEPEND": "dev-libs/B[foo(-)]", "RDEPEND": "dev-libs/B[foo(-)]", "EAPI": 4 },
- #~ "dev-libs/B-1": { "IUSE": "+foo", "EAPI": 1 },
- #~ "dev-libs/B-2": {},
- #~ }
-#~
- #~ test_cases = (
- #~ ResolverPlaygroundTestCase(
- #~ ["=dev-libs/A-1"],
- #~ success = True,
- #~ mergelist = ["dev-libs/B-1", "dev-libs/A-1"]),
- #~ ResolverPlaygroundTestCase(
- #~ ["=dev-libs/A-2"],
- #~ success = True,
- #~ mergelist = ["dev-libs/B-2", "dev-libs/A-2"]),
- #~ ResolverPlaygroundTestCase(
- #~ ["=dev-libs/A-3"],
- #~ success = True,
- #~ mergelist = ["dev-libs/B-1", "dev-libs/A-3"]),
- #~ )
-#~
- #~ 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()
+
+ ebuilds = {
+ "dev-libs/A-1": { "DEPEND": "dev-libs/B[foo]", "RDEPEND": "dev-libs/B[foo]", "EAPI": "2" },
+ "dev-libs/A-2": { "DEPEND": "dev-libs/B[foo(+)]", "RDEPEND": "dev-libs/B[foo(+)]", "EAPI": "4" },
+ "dev-libs/A-3": { "DEPEND": "dev-libs/B[foo(-)]", "RDEPEND": "dev-libs/B[foo(-)]", "EAPI": "4" },
+ "dev-libs/B-1": { "IUSE": "+foo", "EAPI": "1" },
+ "dev-libs/B-2": {},
+ }
+
+ test_cases = (
+ ResolverPlaygroundTestCase(
+ ["=dev-libs/A-1"],
+ success = True,
+ mergelist = ["dev-libs/B-1", "dev-libs/A-1"]),
+ ResolverPlaygroundTestCase(
+ ["=dev-libs/A-2"],
+ success = True,
+ mergelist = ["dev-libs/B-2", "dev-libs/A-2"]),
+ ResolverPlaygroundTestCase(
+ ["=dev-libs/A-3"],
+ success = True,
+ mergelist = ["dev-libs/B-1", "dev-libs/A-3"]),
+ )
+
+ 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()