summaryrefslogtreecommitdiffstats
path: root/pym/portage/tests/resolver/test_autounmask.py
diff options
context:
space:
mode:
authorSebastian Luther <SebastianLuther@gmx.de>2010-09-17 14:50:19 +0200
committerZac Medico <zmedico@gentoo.org>2010-09-17 13:58:38 -0700
commit35ad22e7ce30a43451a7cfe0498ec483f149ba48 (patch)
treead90eed7e0335cfc0bbb8e0ea1b99837d2a96ee1 /pym/portage/tests/resolver/test_autounmask.py
parent7cf0bd4c28122fd0c7c00cfac84e08ac4c69e283 (diff)
downloadportage-35ad22e7ce30a43451a7cfe0498ec483f149ba48.tar.gz
portage-35ad22e7ce30a43451a7cfe0498ec483f149ba48.tar.bz2
portage-35ad22e7ce30a43451a7cfe0498ec483f149ba48.zip
--autounmask: Support license changes
Diffstat (limited to 'pym/portage/tests/resolver/test_autounmask.py')
-rw-r--r--pym/portage/tests/resolver/test_autounmask.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/pym/portage/tests/resolver/test_autounmask.py b/pym/portage/tests/resolver/test_autounmask.py
index df541120d..ce3ce38f0 100644
--- a/pym/portage/tests/resolver/test_autounmask.py
+++ b/pym/portage/tests/resolver/test_autounmask.py
@@ -187,3 +187,42 @@ class AutounmaskTestCase(TestCase):
self.assertEqual(test_case.test_success, True, test_case.fail_msg)
finally:
playground.cleanup()
+
+ def testAutounmaskForLicenses(self):
+
+ ebuilds = {
+ "dev-libs/A-1": { "LICENSE": "TEST" },
+ "dev-libs/B-1": { "LICENSE": "TEST", "IUSE": "foo", "KEYWORDS": "~x86"},
+ "dev-libs/C-1": { "DEPEND": "dev-libs/B[foo]", "EAPI": 2 },
+ }
+
+ test_cases = (
+ ResolverPlaygroundTestCase(
+ ["=dev-libs/A-1"],
+ options = {"--autounmask": False},
+ success = False),
+ ResolverPlaygroundTestCase(
+ ["=dev-libs/A-1"],
+ options = {"--autounmask": True},
+ success = False,
+ mergelist = ["dev-libs/A-1"],
+ license_changes = { "dev-libs/A-1": set(["TEST"]) }),
+
+ #Test license+keyword+use change at once.
+ ResolverPlaygroundTestCase(
+ ["=dev-libs/C-1"],
+ options = {"--autounmask": True},
+ success = False,
+ mergelist = ["dev-libs/B-1", "dev-libs/C-1"],
+ license_changes = { "dev-libs/B-1": set(["TEST"]) },
+ unstable_keywords = ["dev-libs/B-1"],
+ use_changes = { "dev-libs/B-1": { "foo": 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()