bug 740242 - add some diagnostics to get more info about Python exceptions during Mochitest. r=jmaher, a=test-only

This commit is contained in:
Ted Mielczarek 2012-05-02 07:15:07 -04:00
parent 123b355ccf
commit 1fb7a44e1e
2 changed files with 2 additions and 2 deletions

View File

@ -792,13 +792,13 @@ user_pref("camino.use_system_proxy_settings", false); // Camino-only, harmless t
(line, didTimeout) = self.readWithTimeout(logsource, timeout)
while line != "" and not didTimeout:
self.log.info(line.rstrip().decode("UTF-8", "ignore"))
if logger:
logger.log(line)
if "TEST-START" in line and "|" in line:
self.lastTestSeen = line.split("|")[1].strip()
if stackFixerFunction:
line = stackFixerFunction(line)
self.log.info(line.rstrip().decode("UTF-8", "ignore"))
if not debuggerInfo and "TEST-UNEXPECTED-FAIL" in line and "Test timed out" in line:
if self.haveDumpedScreen:
self.log.info("Not taking screenshot here: see the one that was previously logged")

View File

@ -700,7 +700,7 @@ class Mochitest(object):
self.automation.log.info("INFO | runtests.py | Received keyboard interrupt.\n");
status = -1
except:
self.automation.log.info("INFO | runtests.py | Received unexpected exception while running application '%s'\n" % (sys.exc_info()[1]))
self.automation.log.exception("INFO | runtests.py | Received unexpected exception while running application\n")
status = 1
if options.vmwareRecording: