Bug 1068276, part 1 - Allow configuring which type of processes we complain about when there's no leak log. r=jmaher
Then don't warn for missing logs from tab and geckomediaplugin processes, or default processes on B2G.
This commit is contained in:
@@ -196,7 +196,7 @@ def dumpLeakLog(leakLogFile, filter = False):
|
||||
# Simply copy the log.
|
||||
log.info(leakReport.rstrip("\n"))
|
||||
|
||||
def processSingleLeakFile(leakLogFileName, processType, leakThreshold):
|
||||
def processSingleLeakFile(leakLogFileName, processType, leakThreshold, ignoreMissingLeaks):
|
||||
"""Process a single leak log.
|
||||
"""
|
||||
|
||||
@@ -273,11 +273,16 @@ def processSingleLeakFile(leakLogFileName, processType, leakThreshold):
|
||||
if crashedOnPurpose:
|
||||
log.info("TEST-INFO | leakcheck | %s deliberate crash and thus no leak log"
|
||||
% processString)
|
||||
elif ignoreMissingLeaks:
|
||||
log.info("TEST-INFO | leakcheck | %s ignoring missing output line for total leaks"
|
||||
% processString)
|
||||
else:
|
||||
# TODO: This should be a TEST-UNEXPECTED-FAIL, but was changed to a warning
|
||||
# due to too many intermittent failures (see bug 831223).
|
||||
log.info("WARNING | leakcheck | %s missing output line for total leaks!"
|
||||
% processString)
|
||||
log.info("TEST-INFO | leakcheck | missing output line from log file %s"
|
||||
% leakLogFileName)
|
||||
return
|
||||
|
||||
if totalBytesLeaked == 0:
|
||||
@@ -306,7 +311,7 @@ def processSingleLeakFile(leakLogFileName, processType, leakThreshold):
|
||||
log.info("%s | leakcheck | %s %d bytes leaked (%s)"
|
||||
% (prefix, processString, totalBytesLeaked, leakedObjectSummary))
|
||||
|
||||
def processLeakLog(leakLogFile, leakThresholds):
|
||||
def processLeakLog(leakLogFile, leakThresholds, ignoreMissingLeaks):
|
||||
"""Process the leak log, including separate leak logs created
|
||||
by child processes.
|
||||
|
||||
@@ -363,7 +368,8 @@ def processLeakLog(leakLogFile, leakThresholds):
|
||||
log.info("TEST-UNEXPECTED-FAIL | leakcheck | Leak log with unknown process type %s"
|
||||
% processType)
|
||||
leakThreshold = leakThresholds.get(processType, 0)
|
||||
processSingleLeakFile(thisFile, processType, leakThreshold)
|
||||
processSingleLeakFile(thisFile, processType, leakThreshold,
|
||||
processType in ignoreMissingLeaks)
|
||||
|
||||
def replaceBackSlashes(input):
|
||||
return input.replace('\\', '/')
|
||||
|
||||
Reference in New Issue
Block a user