зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1049717 - Expose suite start and end times in the BaseMarionetteTestRunner. r=mdas
This commit is contained in:
Родитель
dcbd1e34b6
Коммит
977b69ad22
|
@ -2,7 +2,6 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from datetime import datetime
|
||||
from optparse import OptionParser
|
||||
|
||||
import json
|
||||
|
@ -614,7 +613,7 @@ class BaseMarionetteTestRunner(object):
|
|||
|
||||
def run_tests(self, tests):
|
||||
self.reset_test_stats()
|
||||
starttime = datetime.utcnow()
|
||||
self.start_time = time.time()
|
||||
|
||||
need_external_ip = True
|
||||
if not self.marionette:
|
||||
|
@ -675,7 +674,8 @@ class BaseMarionetteTestRunner(object):
|
|||
except:
|
||||
traceback.print_exc()
|
||||
|
||||
self.elapsedtime = datetime.utcnow() - starttime
|
||||
self.end_time = time.time()
|
||||
self.elapsedtime = self.end_time - self.start_time
|
||||
|
||||
if self.xml_output:
|
||||
xml_dir = os.path.dirname(os.path.abspath(self.xml_output))
|
||||
|
@ -909,7 +909,7 @@ class BaseMarionetteTestRunner(object):
|
|||
|
||||
testsuite = doc.createElement('testsuite')
|
||||
testsuite.setAttribute('name', 'Marionette')
|
||||
testsuite.setAttribute('time', str(self.elapsedtime.total_seconds()))
|
||||
testsuite.setAttribute('time', str(self.elapsedtime))
|
||||
testsuite.setAttribute('tests', str(sum([results.testsRun for
|
||||
results in results_list])))
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ class HTMLReportingTestRunnerMixin(object):
|
|||
errors = sum([len(results.errors) for results in results_list])
|
||||
passes = sum([results.passed for results in results_list])
|
||||
unexpected_passes = sum([len(results.unexpectedSuccesses) for results in results_list])
|
||||
test_time = self.elapsedtime.total_seconds()
|
||||
test_time = self.elapsedtime
|
||||
test_logs = []
|
||||
|
||||
def _extract_html_from_result(result):
|
||||
|
|
Загрузка…
Ссылка в новой задаче