Bug 765095 - Post logcat log to autolog, r=mdas, DONTBUILD because NPOTB
authorJonathan Griffin <jgriffin@mozilla.com>
Thu, 14 Jun 2012 18:26:43 -0700
changeset 96673 da8c6039c25ec00aeb3e90d02957ab7d711b9cb6
parent 96672 9bbc55b71de8754e1c8c80dd493a03460ecf3578
child 96674 6a4feddc241b00239656e8fb67bdef2cf22637d3
push id22931
push userjgriffin@mozilla.com
push dateFri, 15 Jun 2012 01:27:05 +0000
treeherdermozilla-central@da8c6039c25e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmdas, DONTBUILD
bugs765095
milestone16.0a1
first release with
nightly linux32
da8c6039c25e / 16.0a1 / 20120615042503 / files
nightly linux64
da8c6039c25e / 16.0a1 / 20120615042503 / files
nightly mac
da8c6039c25e / 16.0a1 / 20120615042503 / files
nightly win32
da8c6039c25e / 16.0a1 / 20120615042503 / files
nightly win64
da8c6039c25e / 16.0a1 / 20120615042503 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 765095 - Post logcat log to autolog, r=mdas, DONTBUILD because NPOTB
testing/marionette/client/marionette/runtests.py
--- a/testing/marionette/client/marionette/runtests.py
+++ b/testing/marionette/client/marionette/runtests.py
@@ -229,27 +229,35 @@ class MarionetteTestRunner(object):
                                          noWindow=self.noWindow,
                                          logcat_dir=self.logcat_dir)
         else:
             raise Exception("must specify binary, address or emulator")
 
     def post_to_autolog(self, elapsedtime):
         self.logger.info('posting results to autolog')
 
+        logfile = None
+        if self.emulator:
+            filename = os.path.join(os.path.abspath(self.logcat_dir),
+                                    "emulator-%d.log" % self.marionette.emulator.port)
+            if os.access(filename, os.F_OK):
+                logfile = filename
+
         # This is all autolog stuff.
         # See: https://wiki.mozilla.org/Auto-tools/Projects/Autolog
         from mozautolog import RESTfulAutologTestGroup
         testgroup = RESTfulAutologTestGroup(
             testgroup = self.testgroup,
             os = 'android',
             platform = 'emulator',
             harness = 'marionette',
             server = self.es_server,
             restserver = self.rest_server,
-            machine = socket.gethostname())
+            machine = socket.gethostname(),
+            logfile = logfile)
 
         testgroup.set_primary_product(
             tree = 'b2g',
             buildtype = 'opt',
             revision = self.revision)
 
         testgroup.add_test_suite(
             testsuite = 'b2g emulator testsuite',