From a82a8be57da87d324a701851a0f826008a81791d Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Wed, 29 Jul 2009 12:08:32 +0200 Subject: Testing for more packages in create_dep_groups --- src/tinderbox/test/TinderboxTest.py | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/tinderbox/test/TinderboxTest.py b/src/tinderbox/test/TinderboxTest.py index 17ce0da..11b26f9 100644 --- a/src/tinderbox/test/TinderboxTest.py +++ b/src/tinderbox/test/TinderboxTest.py @@ -13,24 +13,23 @@ class TinderboxTest(unittest.TestCase): self.trees = portage.create_trees() self.portapi = self.trees[portage.root]["porttree"].dbapi self.portset = portage.config(clone=portage.settings) + self.pkgs = ['dev-db/hsqldb-1.8.0.9-r1','app-shells/bash-3.2_p39','sys-apps/portage-2.1.4.5'] def testCreateDepGroups(self): settings = self.portset portapi = self.portapi - pkg = 'dev-db/hsqldb-1.8.0.9-r1' - - deps = portapi.aux_get(pkg, ["DEPEND"]) - deps = portage.dep.paren_reduce(deps[0]) - settings.setcpv(pkg, mydb=self.portapi) - use_enabled = set(settings["PORTAGE_USE"].split()) - iuse = set(settings["IUSE"].split()) - use_deps = portage.dep.use_reduce(deps, list(use_enabled & iuse)) - - - use_deps = self.tb._normalize_dependencies(use_deps) - - use_deps = flatten_deps(use_deps) - self.tb.create_dep_groups(use_deps) + for pkg in self.pkgs: + deps = portapi.aux_get(pkg, ["DEPEND"]) + deps = portage.dep.paren_reduce(deps[0]) + settings.setcpv(pkg, mydb=self.portapi) + use_enabled = set(settings["PORTAGE_USE"].split()) + iuse = set(settings["IUSE"].split()) + use_deps = portage.dep.use_reduce(deps, list(use_enabled & iuse)) + + use_deps = self.tb._normalize_dependencies(use_deps) + + use_deps = flatten_deps(use_deps) + print self.tb.create_dep_groups(use_deps) -- cgit v1.2.3-65-gdbad