Bug 1087251 - Gather version and device information for HTML logging. r=jgraham
authorDave Hunt <dhunt@mozilla.com>
Fri, 07 Nov 2014 12:49:00 +0000
changeset 214593 9b212f88273096043aa261b577d08b10d7f221bd
parent 214592 41c629664359574f257bd0c6ddec0d894477ddbd
child 214594 064ea6bcfa0b9eb01b935f7263a98b7ae21b59ea
push id27788
push userryanvm@gmail.com
push dateFri, 07 Nov 2014 18:23:58 +0000
treeherdermozilla-central@c39ff12ad6eb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1087251
milestone36.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
Bug 1087251 - Gather version and device information for HTML logging. r=jgraham
testing/marionette/client/marionette/runner/base.py
testing/marionette/client/requirements.txt
--- a/testing/marionette/client/marionette/runner/base.py
+++ b/testing/marionette/client/marionette/runner/base.py
@@ -18,16 +18,17 @@ import xml.dom.minidom as dom
 
 from manifestparser import TestManifest
 from marionette import Marionette
 from mixins.b2g import B2GTestResultMixin, get_b2g_pid, get_dm
 from mozhttpd import MozHttpd
 from mozlog.structured.structuredlog import get_default_logger
 from moztest.adapters.unit import StructuredTestRunner, StructuredTestResult
 from moztest.results import TestResultCollection, TestResult, relevant_line
+import mozversion
 
 class MarionetteTest(TestResult):
 
     @property
     def test_name(self):
         if self.test_class is not None:
             return '%s.py %s.%s' % (self.test_class.split('.')[0],
                                     self.test_class,
@@ -707,17 +708,28 @@ setReq.onerror = function() {
 
         if not self.httpd:
             self.logger.info("starting httpd")
             self.start_httpd(need_external_ip)
 
         for test in tests:
             self.add_test(test)
 
-        self.logger.suite_start(self.tests)
+        version_info = mozversion.get_version(binary=self.bin,
+                                              sources=self.sources,
+                                              dm_type=os.environ.get('DM_TRANS', 'adb'))
+
+        device_info = None
+        if self.capabilities['device'] != 'desktop' and self.capabilities['browserName'] == 'B2G':
+            dm = get_dm(self.marionette)
+            device_info = dm.getInfo()
+
+        self.logger.suite_start(self.tests,
+                                version_info=version_info,
+                                device_info=device_info)
 
         for test in self.manifest_skipped_tests:
             name = os.path.basename(test['path'])
             self.logger.test_start(name)
             self.logger.test_end(name,
                                  'SKIP',
                                  message=test['disabled'])
             self.todo += 1
--- a/testing/marionette/client/requirements.txt
+++ b/testing/marionette/client/requirements.txt
@@ -1,13 +1,13 @@
 marionette-transport == 0.3
 manifestparser
 mozhttpd >= 0.5
 mozinfo >= 0.7
 mozprocess >= 0.9
 mozrunner >= 6.2
 mozdevice >= 0.37
-mozlog >= 2.6
+mozlog >= 2.7
 moznetwork >= 0.21
 mozcrash >= 0.5
 mozprofile >= 0.7
 moztest >= 0.7
 mozversion >= 0.2