Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/tests/resolver/
Date: Tue, 30 Jul 2013 02:13:29
Message-Id: 1375150374.2fe14319d9143610dfdb8d1d044d7432038c857c.zmedico@gentoo
1 commit: 2fe14319d9143610dfdb8d1d044d7432038c857c
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jul 30 02:08:26 2013 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 30 02:12:54 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2fe14319
7
8 Add test for bug #478188.
9
10 ---
11 pym/portage/tests/resolver/test_or_choices.py | 65 +++++++++++++++++++++++++++
12 1 file changed, 65 insertions(+)
13
14 diff --git a/pym/portage/tests/resolver/test_or_choices.py b/pym/portage/tests/resolver/test_or_choices.py
15 new file mode 100644
16 index 0000000..3bc67bc
17 --- /dev/null
18 +++ b/pym/portage/tests/resolver/test_or_choices.py
19 @@ -0,0 +1,65 @@
20 +# Copyright 2013 Gentoo Foundation
21 +# Distributed under the terms of the GNU General Public License v2
22 +
23 +from portage.tests import TestCase
24 +from portage.tests.resolver.ResolverPlayground import (ResolverPlayground,
25 + ResolverPlaygroundTestCase)
26 +
27 +class OrChoicesTestCase(TestCase):
28 +
29 + def testOrChoices(self):
30 + ebuilds = {
31 + "dev-lang/vala-0.20.0" : {
32 + "EAPI": "5",
33 + "SLOT": "0.20"
34 + },
35 + "dev-lang/vala-0.18.0" : {
36 + "EAPI": "5",
37 + "SLOT": "0.18"
38 + },
39 + #"dev-libs/gobject-introspection-1.36.0" : {
40 + # "EAPI": "5",
41 + # "RDEPEND" : "!<dev-lang/vala-0.20.0",
42 + #},
43 + "dev-libs/gobject-introspection-1.34.0" : {
44 + "EAPI": "5"
45 + },
46 + "sys-apps/systemd-ui-2" : {
47 + "EAPI": "5",
48 + "RDEPEND" : "|| ( dev-lang/vala:0.20 dev-lang/vala:0.18 )"
49 + },
50 + }
51 +
52 + installed = {
53 + "dev-lang/vala-0.18.0" : {
54 + "EAPI": "5",
55 + "SLOT": "0.18"
56 + },
57 + "dev-libs/gobject-introspection-1.34.0" : {
58 + "EAPI": "5"
59 + },
60 + "sys-apps/systemd-ui-2" : {
61 + "EAPI": "5",
62 + "RDEPEND" : "|| ( dev-lang/vala:0.20 dev-lang/vala:0.18 )"
63 + },
64 + }
65 +
66 + world = ["dev-libs/gobject-introspection", "sys-apps/systemd-ui"]
67 +
68 + test_cases = (
69 + # Demonstrate that vala:0.20 update is not pulled in, as in bug #478188
70 + ResolverPlaygroundTestCase(
71 + ["@world"],
72 + options = {"--update": True, "--deep": True},
73 + success=True,
74 + all_permutations = True,
75 + mergelist = []),
76 + )
77 +
78 + playground = ResolverPlayground(ebuilds=ebuilds, installed=installed, world=world)
79 + try:
80 + for test_case in test_cases:
81 + playground.run_TestCase(test_case)
82 + self.assertEqual(test_case.test_success, True, test_case.fail_msg)
83 + finally:
84 + playground.cleanup()