From 0a33a054c3c287df0164714c792f429c5da59e60 Mon Sep 17 00:00:00 2001 From: Serge Gautherie Date: Tue, 17 Mar 2009 15:22:59 +0100 Subject: [PATCH] Bug 482236 - runtests.py.in : wrong leak detection on this case; (Av1a) Support a negative 'Total' value; r=(dbaron + jwalden+bmo) --- build/automation.py.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build/automation.py.in b/build/automation.py.in index e38f787d195..f6de7330108 100644 --- a/build/automation.py.in +++ b/build/automation.py.in @@ -441,7 +441,7 @@ def processLeakLog(leakLogFile, leakThreshold): # 833 nsTimerImpl 60 120 24726 2 ... lineRe = re.compile(r"^\s*\d+\s+(?P\S+)\s+" r"(?P-?\d+)\s+(?P-?\d+)\s+" - r"\d+\s+(?P-?\d+)") + r"-?\d+\s+(?P-?\d+)") leaks = open(leakLogFile, "r") for line in leaks: @@ -466,7 +466,9 @@ def processLeakLog(leakLogFile, leakThreshold): numLeaked = int(matches.group("numLeaked")) if size < 0 or bytesLeaked < 0 or numLeaked < 0: log.info("TEST-UNEXPECTED-FAIL | runtests-leaks | negative leaks caught!") - if "TOTAL" == name: + if name == "TOTAL": + seenTotal = True + elif name == "TOTAL": seenTotal = True # Check for leaks. if bytesLeaked < 0 or bytesLeaked > leakThreshold: @@ -485,7 +487,7 @@ def processLeakLog(leakLogFile, leakThreshold): log.info(leakLog) else: if numLeaked != 0: - if abs(numLeaked) > 1: + if numLeaked > 1: instance = "instances" rest = " each (%s bytes total)" % matches.group("bytesLeaked") else: