зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1081025 - Fix test failure debug gathering. r=zcampbell
This commit is contained in:
Родитель
e3819dc768
Коммит
f04b5ef31b
|
@ -11,6 +11,7 @@ import pkg_resources
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
from mozlog.structured.structuredlog import get_default_logger
|
||||||
import mozversion
|
import mozversion
|
||||||
from xmlgen import html
|
from xmlgen import html
|
||||||
from xmlgen import raw
|
from xmlgen import raw
|
||||||
|
@ -247,9 +248,9 @@ class HTMLReportingTestResultMixin(object):
|
||||||
def gather_debug(self):
|
def gather_debug(self):
|
||||||
debug = {}
|
debug = {}
|
||||||
try:
|
try:
|
||||||
self.marionette.switch_context(self.marionette.CONTEXT_CHROME)
|
self.marionette.set_context(self.marionette.CONTEXT_CHROME)
|
||||||
debug['screenshot'] = self.marionette.screenshot()
|
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
|
debug['source'] = self.marionette.page_source
|
||||||
self.marionette.switch_to_frame()
|
self.marionette.switch_to_frame()
|
||||||
debug['settings'] = json.dumps(self.marionette.execute_async_script("""
|
debug['settings'] = json.dumps(self.marionette.execute_async_script("""
|
||||||
|
@ -260,6 +261,7 @@ req.onsuccess = function() {
|
||||||
marionetteScriptFinished(req.result);
|
marionetteScriptFinished(req.result);
|
||||||
}""", special_powers=True), sort_keys=True, indent=4, separators=(',', ': '))
|
}""", special_powers=True), sort_keys=True, indent=4, separators=(',', ': '))
|
||||||
except:
|
except:
|
||||||
pass
|
logger = get_default_logger()
|
||||||
|
logger.warning('Failed to gather test failure debug.', exc_info=True)
|
||||||
return debug
|
return debug
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче