diff options
author | Sebastian Luther <SebastianLuther@gmx.de> | 2010-08-12 14:00:13 +0200 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-12 05:34:19 -0700 |
commit | 14d949b1e6987207b91e0c0d43162406135345d8 (patch) | |
tree | 92ef2e2910bd1f90c6c9e8f82c2ca0be2aa4d983 /pym/portage | |
parent | d89629ec27d01b601994fed512a76d6961a66a8e (diff) | |
download | portage-14d949b1e6987207b91e0c0d43162406135345d8.tar.gz portage-14d949b1e6987207b91e0c0d43162406135345d8.tar.bz2 portage-14d949b1e6987207b91e0c0d43162406135345d8.zip |
Tests: ResolverPlayground: add debug option to not supress depgraph output
Useful for debugging test cases.
Diffstat (limited to 'pym/portage')
-rw-r--r-- | pym/portage/tests/resolver/ResolverPlayground.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py index d085b40d3..9440378c7 100644 --- a/pym/portage/tests/resolver/ResolverPlayground.py +++ b/pym/portage/tests/resolver/ResolverPlayground.py @@ -27,13 +27,14 @@ class ResolverPlayground(object): it's work. """ - def __init__(self, ebuilds={}, installed={}, profile={}, world=[]): + def __init__(self, ebuilds={}, installed={}, profile={}, world=[], debug=False): """ ebuilds: cpv -> metadata mapping simulating avaiable ebuilds. installed: cpv -> metadata mapping simulating installed packages. If a metadata key is missing, it gets a default value. profile: settings defined by the profile. """ + self.debug = debug self.root = tempfile.mkdtemp() + os.path.sep self.portdir = os.path.join(self.root, "usr/portage") self.vdbdir = os.path.join(self.root, "var/db/pkg") @@ -236,7 +237,8 @@ class ResolverPlayground(object): # conditional test code. options["_test_"] = True - portage.util.noiselimit = -2 + if not self.debug: + portage.util.noiselimit = -2 params = create_depgraph_params(options, action) success, depgraph, favorites = backtrack_depgraph( self.settings, self.trees, options, params, action, atoms, None) |