aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStanislav Ochotnicky <sochotnicky@gmail.com>2009-07-29 12:08:32 +0200
committerStanislav Ochotnicky <sochotnicky@gmail.com>2009-07-29 12:08:32 +0200
commita82a8be57da87d324a701851a0f826008a81791d (patch)
tree29f4d1b61da1b631042dd73eaf8c27bae330a420 /src
parentAdded handling for '||' groups of dependencies (diff)
downloadcollagen-a82a8be57da87d324a701851a0f826008a81791d.tar.gz
collagen-a82a8be57da87d324a701851a0f826008a81791d.tar.bz2
collagen-a82a8be57da87d324a701851a0f826008a81791d.zip
Testing for more packages in create_dep_groups
Diffstat (limited to 'src')
-rw-r--r--src/tinderbox/test/TinderboxTest.py27
1 files 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)