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: Mon, 04 Mar 2013 23:37:35
Message-Id: 1362440238.35b380891f4d142e77fc873368724c1d90c014e6.zmedico@gentoo
1 commit: 35b380891f4d142e77fc873368724c1d90c014e6
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 4 23:37:18 2013 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 4 23:37:18 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=35b38089
7
8 Add test for bug #460304.
9
10 ---
11 pym/portage/tests/resolver/test_slot_abi.py | 59 ++++++++++++++++++++++++++-
12 1 files changed, 58 insertions(+), 1 deletions(-)
13
14 diff --git a/pym/portage/tests/resolver/test_slot_abi.py b/pym/portage/tests/resolver/test_slot_abi.py
15 index 8aed5d3..ca3662d 100644
16 --- a/pym/portage/tests/resolver/test_slot_abi.py
17 +++ b/pym/portage/tests/resolver/test_slot_abi.py
18 @@ -1,4 +1,4 @@
19 -# Copyright 2012 Gentoo Foundation
20 +# Copyright 2012-2013 Gentoo Foundation
21 # Distributed under the terms of the GNU General Public License v2
22
23 from portage.tests import TestCase
24 @@ -247,6 +247,63 @@ class SlotAbiTestCase(TestCase):
25 finally:
26 playground.cleanup()
27
28 +
29 + def testWholeSlotConditional(self):
30 + ebuilds = {
31 + "dev-libs/libnl-3.2.14" : {
32 + "SLOT": "3"
33 + },
34 + "dev-libs/libnl-1.1-r3" : {
35 + "SLOT": "1.1"
36 + },
37 + "net-misc/networkmanager-0.9.6.4-r1" : {
38 + "EAPI": "5",
39 + "IUSE": "wimax",
40 + "DEPEND": "wimax? ( dev-libs/libnl:1.1= ) !wimax? ( dev-libs/libnl:3= )",
41 + "RDEPEND": "wimax? ( dev-libs/libnl:1.1= ) !wimax? ( dev-libs/libnl:3= )"
42 + },
43 + }
44 + installed = {
45 + "dev-libs/libnl-1.1-r3" : {
46 + "SLOT": "1.1"
47 + },
48 + "net-misc/networkmanager-0.9.6.4-r1" : {
49 + "EAPI": "5",
50 + "IUSE": "wimax",
51 + "USE": "wimax",
52 + "DEPEND": "dev-libs/libnl:1.1/1.1=",
53 + "RDEPEND": "dev-libs/libnl:1.1/1.1="
54 + },
55 + }
56 +
57 + user_config = {
58 + "make.conf" : ("USE=\"wimax\"",)
59 + }
60 +
61 + world = ["net-misc/networkmanager"]
62 +
63 + test_cases = (
64 +
65 + # Demonstrate bug #460304, where _slot_operator_update_probe needs
66 + # to account for USE conditional deps.
67 + ResolverPlaygroundTestCase(
68 + ["@world"],
69 + options = {"--update": True, "--deep": True},
70 + success = True,
71 + mergelist = ["net-misc/networkmanager-0.9.6.4-r1"]),
72 +
73 + )
74 +
75 + playground = ResolverPlayground(ebuilds=ebuilds,
76 + installed=installed, user_config=user_config, world=world,
77 + debug=False)
78 + try:
79 + for test_case in test_cases:
80 + playground.run_TestCase(test_case)
81 + self.assertEqual(test_case.test_success, True, test_case.fail_msg)
82 + finally:
83 + playground.cleanup()
84 +
85 def testWholeSlotSubSlotMix(self):
86 ebuilds = {
87 "dev-libs/glib-1.2.10" : {