* [gentoo-portage-dev] [PATCH 1/2] Add a unit test which reproduces bug 584626
@ 2016-06-23 7:38 99% Zac Medico
0 siblings, 0 replies; 1+ results
From: Zac Medico @ 2016-06-23 7:38 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Zac Medico
X-Gentoo-Bug: 584626
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=584626
---
.../resolver/test_slot_operator_reverse_deps.py | 109 +++++++++++++++++++++
1 file changed, 109 insertions(+)
create mode 100644 pym/portage/tests/resolver/test_slot_operator_reverse_deps.py
diff --git a/pym/portage/tests/resolver/test_slot_operator_reverse_deps.py b/pym/portage/tests/resolver/test_slot_operator_reverse_deps.py
new file mode 100644
index 0000000..72879f8
--- /dev/null
+++ b/pym/portage/tests/resolver/test_slot_operator_reverse_deps.py
@@ -0,0 +1,109 @@
+# Copyright 2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+from portage.tests import TestCase
+from portage.tests.resolver.ResolverPlayground import (
+ ResolverPlayground,
+ ResolverPlaygroundTestCase,
+)
+
+class SlotOperatorReverseDepsTestCase(TestCase):
+
+ def testSlotOperatorReverseDeps(self):
+
+ ebuilds = {
+
+ "media-libs/mesa-11.2.2" : {
+ "EAPI": "6",
+ "SLOT": "0",
+ "RDEPEND": ">=sys-devel/llvm-3.6.0:="
+ },
+
+ "sys-devel/clang-3.7.1-r100" : {
+ "EAPI": "6",
+ "SLOT": "0/3.7",
+ "RDEPEND": "~sys-devel/llvm-3.7.1"
+ },
+
+ "sys-devel/clang-3.8.0-r100" : {
+ "EAPI": "6",
+ "SLOT": "0/3.8",
+ "RDEPEND": "~sys-devel/llvm-3.8.0"
+ },
+
+ "sys-devel/llvm-3.7.1-r2" : {
+ "EAPI": "6",
+ "SLOT": "0/3.7.1",
+ "PDEPEND": "=sys-devel/clang-3.7.1-r100"
+ },
+
+ "sys-devel/llvm-3.8.0-r2" : {
+ "EAPI": "6",
+ "SLOT": "0/3.8.0",
+ "PDEPEND": "=sys-devel/clang-3.8.0-r100"
+ },
+
+ }
+
+ installed = {
+
+ "media-libs/mesa-11.2.2" : {
+ "EAPI": "6",
+ "SLOT": "0",
+ "RDEPEND": ">=sys-devel/llvm-3.6.0:0/3.7.1="
+ },
+
+ "sys-devel/clang-3.7.1-r100" : {
+ "EAPI": "6",
+ "SLOT": "0/3.7",
+ "RDEPEND": "~sys-devel/llvm-3.7.1"
+ },
+
+ "sys-devel/llvm-3.7.1-r2" : {
+ "EAPI": "6",
+ "SLOT": "0/3.7.1",
+ "PDEPEND": "=sys-devel/clang-3.7.1-r100"
+ },
+
+ }
+
+ world = ["media-libs/mesa"]
+
+ test_cases = (
+
+ # Test bug #584626, where an llvm update is missed due to
+ # the check_reverse_dependencies function seeing that
+ # updating llvm will break a dependency of the installed
+ # version of clang (though a clang update is available).
+ ResolverPlaygroundTestCase(
+ ["@world"],
+ options = {"--update": True, "--deep": True},
+ success = True,
+ mergelist = [],
+ ),
+
+ ResolverPlaygroundTestCase(
+ ["@world"],
+ options = {
+ "--update": True,
+ "--deep": True,
+ "--ignore-built-slot-operator-deps": "y",
+ },
+ success = True,
+ mergelist = [
+ 'sys-devel/llvm-3.8.0-r2',
+ 'sys-devel/clang-3.8.0-r100',
+ ],
+ ),
+
+ )
+
+ playground = ResolverPlayground(ebuilds=ebuilds,
+ installed=installed, world=world, debug=False)
+ 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()
--
2.7.4
^ permalink raw reply related [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-06-23 7:38 99% [gentoo-portage-dev] [PATCH 1/2] Add a unit test which reproduces bug 584626 Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox