Add extra debugging around git.repo gc leaks
We're starting to see this in tests and it's not clear why.
Change-Id: Ic52f74785184b4df0cdc659ee353c44ef7522c89
diff --git a/tests/base.py b/tests/base.py
index 7ee9b9c..4525627 100755
--- a/tests/base.py
+++ b/tests/base.py
@@ -1427,6 +1427,9 @@
gc.collect()
for obj in gc.get_objects():
if isinstance(obj, git.Repo):
+ self.log.debug("Leaked git repo object: %s" % repr(obj))
+ for r in gc.get_referrers(obj):
+ self.log.debug(" referrer: %s" % repr(r))
repos.append(obj)
self.assertEqual(len(repos), 0)
self.assertEmptyQueues()