Bug 625146 - Don't count MozMill support functions (setupModule, etc) as tests. r=asuth
authorSiddharth Agarwal <sid.bugzilla@gmail.com>
Thu, 13 Jan 2011 13:43:09 +0530
changeset 6942 361272957658484b3fc4408e12c38096a7baaea7
parent 6941 1bd4ab0795c198e281e41137511a15bc13045a9a
child 6943 3ac5765940a616c70409ac5fd13740872faa7104
push id5322
push usersid.bugzilla@gmail.com
push dateThu, 13 Jan 2011 08:20:57 +0000
treeherdercomm-central@3ac5765940a6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersasuth
bugs625146
Bug 625146 - Don't count MozMill support functions (setupModule, etc) as tests. r=asuth
mail/test/mozmill/runtest.py
--- a/mail/test/mozmill/runtest.py
+++ b/mail/test/mozmill/runtest.py
@@ -374,25 +374,29 @@ def prettyPrintException(e):
                 path = pathAndLine
                 line = 0
             if funcname:
                 print '      ', funcname, prettifyFilename(path), line
             else:
                 print '           ', prettifyFilename(path), line
 
 
+# Tests that are useless and shouldn't be printed if successful
+TEST_BLACKLIST = ["setupModule", "setupTest", "teardownTest", "teardownModule"]
+
 import pprint
 def prettyPrintResults():
     for result in TEST_RESULTS:
         #pprint.pprint(result)
         testOrSummary = 'TEST'
         if 'summary' in result:
             testOrSummary = 'SUMMARY'
         if len(result['fails']) == 0:
-            print '%s-PASS | %s' % (testOrSummary, result['name'])
+            if result['name'] not in TEST_BLACKLIST:
+                print '%s-PASS | %s' % (testOrSummary, result['name'])
         else:
             print '%s-UNEXPECTED-FAIL | %s | %s' % (testOrSummary, prettifyFilename(result['filename']), result['name'])
         for failure in result['fails']:
             if 'exception' in failure:
                 prettyPrintException(failure['exception'])
 
 import atexit
 atexit.register(prettyPrintResults)