Bug 747070 - Catch errors when posting to autolog, a=testonly, npotb
authorJonathan Griffin <jgriffin@mozilla.com>
Thu, 19 Apr 2012 10:31:34 -0700
changeset 95726 ae2b3faa56ab7f1b27eee91c2b22ab3a56eb7280
parent 95725 b7654b9a869713346dd432249fe9ef39824ad4dd
child 95727 dfebd9e035c26533d3303f5296d48e26363e7bfb
push id1439
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 20:19:22 +0000
treeherdermozilla-aurora@ea74834dccd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly, npotb
bugs747070
milestone14.0a1
Bug 747070 - Catch errors when posting to autolog, a=testonly, npotb
testing/tps/tps/testrunner.py
--- a/testing/tps/tps/testrunner.py
+++ b/testing/tps/tps/testrunner.py
@@ -519,17 +519,22 @@ class TPSTestRunner(object):
         errorlog = self.errorlogs.get(test['name'])
         errorlog_filename = errorlog.filename if errorlog else None
         group.add_test_failure(
               test = test['name'],
               status = test['state'],
               text = test['message'],
               logfile = errorlog_filename
             )
-    group.submit()
+    try:
+        group.submit()
+    except:
+        self.sendEmail('<pre>%s</pre>' % traceback.format_exc(),
+                       sendTo='crossweave@mozilla.com')
+        return
 
     # Iterate through all testfailure objects, and update the postdata
     # dict with the testfailure logurl's, if any.
     for tf in group.testsuites[-1].testfailures:
       result = [x for x in self.results if x.get('name') == tf.test]
       if not result:
         continue
       result[0]['logurl'] = tf.logurl