bug 569965 - automationutils.processLeakLog() should learn not to TEST-UNEXPECTED-FAIL every single object line when there are lots. r=philor
authorTed Mielczarek <ted.mielczarek@gmail.com>
Thu, 10 Jun 2010 08:27:47 -0400
changeset 43508 581906c32c8427fc34d9c90eb0ba7d0ea27f6b3b
parent 43507 6ea935d3c365a57ab479e74422adf8651ce468a6
child 43509 d1c910f2ec4dd7388fe57ac9defac792ee3f1fa6
push idunknown
push userunknown
push dateunknown
reviewersphilor
bugs569965
milestone1.9.3a6pre
bug 569965 - automationutils.processLeakLog() should learn not to TEST-UNEXPECTED-FAIL every single object line when there are lots. r=philor
build/automationutils.py
--- a/build/automationutils.py
+++ b/build/automationutils.py
@@ -258,16 +258,17 @@ def processSingleLeakFile(leakLogFileNam
       continue
     log.info(line.rstrip())
   leaks.close()
 
   leaks = open(leakLogFileName, "r")
   seenTotal = False
   crashedOnPurpose = False
   prefix = "TEST-PASS"
+  numObjects = 0
   for line in leaks:
     if line.find("purposefully crash") > -1:
       crashedOnPurpose = True
     matches = lineRe.match(line)
     if not matches:
       continue
     name = matches.group("name")
     size = int(matches.group("size"))
@@ -299,16 +300,20 @@ def processSingleLeakFile(leakLogFileNam
     else:
       if numLeaked != 0:
         if numLeaked > 1:
           instance = "instances"
           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 "
                  "with size %(size)s bytes%(rest)s" %
                  { "prefix": prefix,
                    "process": processString,
                    "numLeaked": numLeaked,
                    "instance": instance,
                    "name": name,
                    "size": matches.group("size"),