Bug 821018 - Fix XML output when tests have been skipped, r=jgriffin

This commit is contained in:
Mihnea Dobrescu-Balaur 2012-12-12 15:29:47 -08:00
Родитель 72e0eb9819
Коммит 6ecb56368a
2 изменённых файлов: 4 добавлений и 3 удалений

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

@ -30,6 +30,7 @@ class CommonTestCase(unittest.TestCase):
unittest.TestCase.__init__(self, methodName)
self.loglines = None
self.perfdata = None
self.duration = 0
@classmethod
def match(cls, filename):
@ -83,11 +84,13 @@ permissions.forEach(function (perm) {
# duration of the test; this is deleted in tearDown() to prevent
# a persistent circular reference which in turn would prevent
# proper garbage collection.
self.start_time = time.time()
self.marionette = self._marionette_weakref()
if self.marionette.session is None:
self.marionette.start_session()
def tearDown(self):
self.duration = time.time() - self.start_time
if self.marionette.session is not None:
self.loglines = self.marionette.get_logs()
self.perfdata = self.marionette.get_perf_data()
@ -125,13 +128,11 @@ class MarionetteTestCase(CommonTestCase):
def setUp(self):
CommonTestCase.setUp(self)
self.start_time = time.time()
self.marionette.test_name = self.test_name
self.marionette.execute_script("log('TEST-START: %s:%s')" %
(self.filepath.replace('\\', '\\\\'), self.methodName))
def tearDown(self):
self.duration = time.time() - self.start_time
self.marionette.set_context("content")
self.marionette.execute_script("log('TEST-END: %s:%s')" %
(self.filepath.replace('\\', '\\\\'), self.methodName))

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

@ -1,7 +1,7 @@
import os
from setuptools import setup, find_packages
version = '0.5.11'
version = '0.5.12'
# get documentation from the README
try: