Tests: ResolverPlayground: more debug stuff
authorSebastian Luther <SebastianLuther@gmx.de>
Thu, 12 Aug 2010 15:31:43 +0000 (17:31 +0200)
committerZac Medico <zmedico@gentoo.org>
Thu, 12 Aug 2010 15:45:35 +0000 (08:45 -0700)
pym/portage/tests/resolver/ResolverPlayground.py

index 9440378c7de731d8f02b567b92c9ebd07ad80791..effeb41f7cd7ce0645b6914e91088f2bd4c1805f 100644 (file)
@@ -233,6 +233,8 @@ class ResolverPlayground(object):
                options["--root"] = self.root
                options["--config-root"] = self.root
                options["--root-deps"] = "rdeps"
+               if self.debug:
+                       options["--debug"] = True
                # Add a fake _test_ option that can be used for
                # conditional test code.
                options["_test_"] = True
@@ -257,7 +259,10 @@ class ResolverPlayground(object):
                                return
 
        def cleanup(self):
-               shutil.rmtree(self.root)
+               if self.debug:
+                       print("\nROOT=%s" % self.root)
+               else:
+                       shutil.rmtree(self.root)
 
 class ResolverPlaygroundTestCase(object):