mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 766319 - Minor perfdata refactor, r=jgriffin, DONTBUILD because NPOTB
This commit is contained in:
parent
c0cdca3984
commit
41fa74e760
@ -23,6 +23,8 @@ class CommonTestCase(unittest.TestCase):
|
||||
|
||||
def __init__(self, methodName):
|
||||
unittest.TestCase.__init__(self, methodName)
|
||||
self.loglines = None
|
||||
self.perfdata = None
|
||||
|
||||
def kill_gaia_app(self, url):
|
||||
self.marionette.execute_script("""
|
||||
@ -89,14 +91,13 @@ whitelist_prefs.forEach(function (pref) {
|
||||
def setUp(self):
|
||||
if self.marionette.session is None:
|
||||
self.marionette.start_session()
|
||||
self.loglines = None
|
||||
self.perfdata = None
|
||||
|
||||
def tearDown(self):
|
||||
if self.marionette.session is not None:
|
||||
self.loglines = self.marionette.get_logs()
|
||||
self.perfdata = self.marionette.get_perf_data()
|
||||
self.marionette.delete_session()
|
||||
|
||||
|
||||
class MarionetteTestCase(CommonTestCase):
|
||||
|
||||
def __init__(self, marionette, methodName='runTest', **kwargs):
|
||||
@ -174,11 +175,6 @@ class MarionetteJSTestCase(CommonTestCase):
|
||||
try:
|
||||
results = self.marionette.execute_js_script(js, args)
|
||||
|
||||
self.loglines = self.marionette.get_logs()
|
||||
self.perfdata = self.marionette.get_perf_data()
|
||||
print "in marionette_test"
|
||||
print self.perfdata
|
||||
|
||||
if launch_app:
|
||||
self.kill_gaia_app(launch_app)
|
||||
|
||||
@ -200,8 +196,6 @@ class MarionetteJSTestCase(CommonTestCase):
|
||||
if not self.perfdata:
|
||||
self.assertTrue(results['passed'] + results['failed'] > 0,
|
||||
'no tests run')
|
||||
if self.marionette.session is not None:
|
||||
self.marionette.delete_session()
|
||||
|
||||
except ScriptTimeoutException:
|
||||
if 'timeout' in self.jsFile:
|
||||
|
@ -377,7 +377,7 @@ class MarionetteTestRunner(object):
|
||||
if suite.countTestCases():
|
||||
results = MarionetteTextTestRunner(verbosity=3).run(suite)
|
||||
self.failed += len(results.failures) + len(results.errors)
|
||||
if results.perfdata:
|
||||
if results.perfdata and options.perf:
|
||||
self.perfrequest.add_datazilla_result(results.perfdata)
|
||||
if hasattr(results, 'skipped'):
|
||||
self.todo += len(results.skipped) + len(results.expectedFailures)
|
||||
|
Loading…
Reference in New Issue
Block a user