Commit e667e665 authored by Michael W. Hudson's avatar Michael W. Hudson

Report refleaks to stderr as the tests run as well as logging them

to a file.
parent 800ba237
...@@ -508,6 +508,8 @@ def runtest(test, generate, verbose, quiet, testdir=None, huntrleaks=False): ...@@ -508,6 +508,8 @@ def runtest(test, generate, verbose, quiet, testdir=None, huntrleaks=False):
deltas.append(sys.gettotalrefcount() - rc - 2) deltas.append(sys.gettotalrefcount() - rc - 2)
print >>sys.stderr print >>sys.stderr
if max(map(abs, deltas[-huntrleaks[1]:])) > 0: if max(map(abs, deltas[-huntrleaks[1]:])) > 0:
print >>sys.stderr, test, 'leaked', \
deltas[-huntrleaks[1]:], 'references'
print >>refrep, test, 'leaked', \ print >>refrep, test, 'leaked', \
deltas[-huntrleaks[1]:], 'references' deltas[-huntrleaks[1]:], 'references'
# The end of the huntrleaks hackishness. # The end of the huntrleaks hackishness.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment