Merge "Don't fail integration tests if browser log couldn't be retrieved"
This commit is contained in:
commit
9ee7099927
|
@ -254,10 +254,12 @@ class BaseTestCase(testtools.TestCase):
|
||||||
|
|
||||||
def _attach_browser_log(self, exc_info=None):
|
def _attach_browser_log(self, exc_info=None):
|
||||||
browser_log_path = os.path.join(self._test_report_dir, 'browser.log')
|
browser_log_path = os.path.join(self._test_report_dir, 'browser.log')
|
||||||
with self.log_exception("Attach browser log"):
|
try:
|
||||||
with open(browser_log_path, 'w') as f:
|
log = self._unwrap_browser_log(self.driver.get_log('browser'))
|
||||||
f.write(
|
except Exception:
|
||||||
self._unwrap_browser_log(self.driver.get_log('browser')))
|
log = traceback.format_exc()
|
||||||
|
with open(browser_log_path, 'w') as f:
|
||||||
|
f.write(log)
|
||||||
|
|
||||||
def _attach_test_log(self, exc_info=None):
|
def _attach_test_log(self, exc_info=None):
|
||||||
test_log_path = os.path.join(self._test_report_dir, 'test.log')
|
test_log_path = os.path.join(self._test_report_dir, 'test.log')
|
||||||
|
|
Loading…
Reference in New Issue