Bug 850681 - Part 1: Use the test name 'leakcheck' rather than 'automationutils.processLeakLog()'; r=ted
authorEd Morley <emorley@mozilla.com>
Mon, 18 Mar 2013 17:18:03 +0000
changeset 136463 102365bfe4d3344eef6d7ec451c1c8890f2a74fd
parent 136462 22d16e3d3ea191e72c5e593d2e43061fcc97643e
child 136464 c314aefc1244a6c370c163e0e29f5613eaebb77b
push id336
push userakeybl@mozilla.com
push dateMon, 17 Jun 2013 22:53:19 +0000
treeherdermozilla-release@574a39cdf657 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs850681
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 850681 - Part 1: Use the test name 'leakcheck' rather than 'automationutils.processLeakLog()'; r=ted Reduces the chance of line wrapping in the TBPL annotated summary, and makes my eyes bleed less every time I see leak failures.
build/automationutils.py
--- a/build/automationutils.py
+++ b/build/automationutils.py
@@ -331,32 +331,32 @@ def processSingleLeakFile(leakLogFileNam
     matches = lineRe.match(line)
     if not matches:
       continue
     name = matches.group("name")
     size = int(matches.group("size"))
     bytesLeaked = int(matches.group("bytesLeaked"))
     numLeaked = int(matches.group("numLeaked"))
     if size < 0 or bytesLeaked < 0 or numLeaked < 0:
-      log.info("TEST-UNEXPECTED-FAIL %s| automationutils.processLeakLog() | negative leaks caught!" %
+      log.info("TEST-UNEXPECTED-FAIL %s| leakcheck | negative leaks caught!" %
                processString)
       if name == "TOTAL":
         seenTotal = True
     elif name == "TOTAL":
       seenTotal = True
       # Check for leaks.
       if bytesLeaked < 0 or bytesLeaked > leakThreshold:
         prefix = "TEST-UNEXPECTED-FAIL"
-        leakLog = "TEST-UNEXPECTED-FAIL %s| automationutils.processLeakLog() | leaked" \
+        leakLog = "TEST-UNEXPECTED-FAIL %s| leakcheck | leaked" \
                   " %d bytes during test execution" % (processString, bytesLeaked)
       elif bytesLeaked > 0:
-        leakLog = "TEST-PASS %s| automationutils.processLeakLog() | WARNING leaked" \
+        leakLog = "TEST-PASS %s| leakcheck | WARNING leaked" \
                   " %d bytes during test execution" % (processString, bytesLeaked)
       else:
-        leakLog = "TEST-PASS %s| automationutils.processLeakLog() | no leaks detected!" \
+        leakLog = "TEST-PASS %s| leakcheck | no leaks detected!" \
                   % processString
       # Remind the threshold if it is not 0, which is the default/goal.
       if leakThreshold != 0:
         leakLog += " (threshold set at %d bytes)" % leakThreshold
       # Log the information.
       log.info(leakLog)
     else:
       if numLeaked != 0:
@@ -365,44 +365,44 @@ def processSingleLeakFile(leakLogFileNam
           rest = " each (%s bytes total)" % matches.group("bytesLeaked")
         else:
           instance = "instance"
           rest = ""
         numObjects += 1
         if numObjects > 5:
           # don't spam brief tinderbox logs with tons of leak output
           prefix = "TEST-INFO"
-        log.info("%(prefix)s %(process)s| automationutils.processLeakLog() | leaked %(numLeaked)d %(instance)s of %(name)s "
+        log.info("%(prefix)s %(process)s| leakcheck | leaked %(numLeaked)d %(instance)s of %(name)s "
                  "with size %(size)s bytes%(rest)s" %
                  { "prefix": prefix,
                    "process": processString,
                    "numLeaked": numLeaked,
                    "instance": instance,
                    "name": name,
                    "size": matches.group("size"),
                    "rest": rest })
   if not seenTotal:
     if crashedOnPurpose:
-      log.info("INFO | automationutils.processLeakLog() | process %s was " \
+      log.info("INFO | leakcheck | process %s was " \
                "deliberately crashed and thus has no leak log" % PID)
     else:
-      log.info("WARNING | automationutils.processLeakLog() | missing output line for total leaks!")
+      log.info("WARNING | leakcheck | missing output line for total leaks!")
   leaks.close()
 
 
 def processLeakLog(leakLogFile, leakThreshold = 0):
   """Process the leak log, including separate leak logs created
   by child processes.
 
   Use this function if you want an additional PASS/FAIL summary.
   It must be used with the |XPCOM_MEM_BLOAT_LOG| environment variable.
   """
 
   if not os.path.exists(leakLogFile):
-    log.info("WARNING | automationutils.processLeakLog() | refcount logging is off, so leaks can't be detected!")
+    log.info("WARNING | leakcheck | refcount logging is off, so leaks can't be detected!")
     return
 
   (leakLogFileDir, leakFileBase) = os.path.split(leakLogFile)
   pidRegExp = re.compile(r".*?_([a-z]*)_pid(\d*)$")
   if leakFileBase[-4:] == ".log":
     leakFileBase = leakFileBase[:-4]
     pidRegExp = re.compile(r".*?_([a-z]*)_pid(\d*).log$")