Bug 1081025 - Fix test failure debug gathering. r=zcampbell

This commit is contained in:
Dave Hunt 2014-10-10 01:51:00 -04:00
Родитель e3819dc768
Коммит f04b5ef31b
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -11,6 +11,7 @@ import pkg_resources
import sys
import time
from mozlog.structured.structuredlog import get_default_logger
import mozversion
from xmlgen import html
from xmlgen import raw
@ -247,9 +248,9 @@ class HTMLReportingTestResultMixin(object):
def gather_debug(self):
debug = {}
try:
self.marionette.switch_context(self.marionette.CONTEXT_CHROME)
self.marionette.set_context(self.marionette.CONTEXT_CHROME)
debug['screenshot'] = self.marionette.screenshot()
self.marionette.switch_context(self.marionette.CONTEXT_CONTENT)
self.marionette.set_context(self.marionette.CONTEXT_CONTENT)
debug['source'] = self.marionette.page_source
self.marionette.switch_to_frame()
debug['settings'] = json.dumps(self.marionette.execute_async_script("""
@ -260,6 +261,7 @@ req.onsuccess = function() {
marionetteScriptFinished(req.result);
}""", special_powers=True), sort_keys=True, indent=4, separators=(',', ': '))
except:
pass
logger = get_default_logger()
logger.warning('Failed to gather test failure debug.', exc_info=True)
return debug