Bug 469509 - runtests.py.in : don't print leak lines for classes that aren't leaked. r=ted

This commit is contained in:
Jeff Walden 2009-01-08 16:52:07 -08:00
Родитель ff00cc8147
Коммит 6ce149f279
1 изменённых файлов: 13 добавлений и 7 удалений

Просмотреть файл

@ -365,19 +365,25 @@ Are you executing $objdir/_tests/testing/mochitest/runtests.py?"""
if not os.path.exists(LEAK_REPORT_FILE):
log.info("WARNING refcount logging is off, so leaks can't be detected!")
else:
leaks = open(LEAK_REPORT_FILE, "r")
for line in leaks:
log.info(line.rstrip())
leaks.close()
threshold = options.leakThreshold
leaks = open(LEAK_REPORT_FILE, "r")
# Per-Inst Leaked Total Rem ...
# 0 TOTAL 17 192 419115886 2 ...
# 833 nsTimerImpl 60 120 24726 2 ...
lineRe = re.compile(r"^\s*\d+\s+(?P<name>\S+)\s+"
r"(?P<size>-?\d+)\s+(?P<bytesLeaked>-?\d+)\s+"
r"\d+\s+(?P<numLeaked>-?\d+)")
leaks = open(LEAK_REPORT_FILE, "r")
for line in leaks:
matches = lineRe.match(line)
if (matches and
int(matches.group("numLeaked")) == 0 and
matches.group("name") != "TOTAL"):
continue
log.info(line.rstrip())
leaks.close()
threshold = options.leakThreshold
leaks = open(LEAK_REPORT_FILE, "r")
seenTotal = False
prefix = "TEST-PASS"
for line in leaks: