author | Mihnea Dobrescu-Balaur <mihneadb@gmail.com> |
Wed, 12 Dec 2012 15:29:47 -0800 | |
changeset 115859 | 652e6b974c13d84f6c933728029d2b99929d7e73 |
parent 115858 | 7ed78ee40e0ea8e7cd4edb7121957baa062cdd17 |
child 115860 | 8bfd7767182cb494e06744d4821ccfc4e734729c |
push id | 24028 |
push user | emorley@mozilla.com |
push date | Thu, 13 Dec 2012 15:56:02 +0000 |
treeherder | autoland@9db79b97abbb [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | jgriffin |
bugs | 821018 |
milestone | 20.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
testing/marionette/client/marionette/marionette_test.py | file | annotate | diff | comparison | revisions | |
testing/marionette/client/setup.py | file | annotate | diff | comparison | revisions |
--- a/testing/marionette/client/marionette/marionette_test.py +++ b/testing/marionette/client/marionette/marionette_test.py @@ -25,16 +25,17 @@ def skip_if_b2g(target): class CommonTestCase(unittest.TestCase): match_re = None def __init__(self, methodName): unittest.TestCase.__init__(self, methodName) self.loglines = None self.perfdata = None + self.duration = 0 @classmethod def match(cls, filename): """ Determines if the specified filename should be handled by this test class; this is done by looking for a match for the filename using cls.match_re. """ @@ -78,21 +79,23 @@ permissions.forEach(function (perm) { """, [url, permissions]) emulator.set_context("content") def setUp(self): # Convert the marionette weakref to an object, just for the # 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() self.marionette.delete_session() self.marionette = None class MarionetteTestCase(CommonTestCase): @@ -120,23 +123,21 @@ class MarionetteTestCase(CommonTestCase) for testname in testnames: suite.addTest(obj(weakref.ref(marionette), methodName=testname, filepath=filepath, testvars=testvars)) 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)) self.marionette.test_name = None CommonTestCase.tearDown(self) def get_new_emulator(self): self.extra_emulator_index += 1
--- a/testing/marionette/client/setup.py +++ b/testing/marionette/client/setup.py @@ -1,12 +1,12 @@ import os from setuptools import setup, find_packages -version = '0.5.11' +version = '0.5.12' # get documentation from the README try: here = os.path.dirname(os.path.abspath(__file__)) description = file(os.path.join(here, 'README.md')).read() except (OSError, IOError): description = ''