Bug 1226381 - Marionette should print real path for profile location. r=automatedtester, r=maja_zf
authorAditya Motwani <adityamotwani@gmail.com>
Tue, 01 Mar 2016 19:44:24 +0530
changeset 286683 2f2d8d5d1b5a5823a07d492bbcbce0c1a53c9af8
parent 286682 a5d2e586777cdef660d7e625a5253669fd8b33ec
child 286684 f5d666bda9a75c46cc8ed753015c3f4a8b0e41ba
push id30053
push usercbook@mozilla.com
push dateFri, 04 Mar 2016 10:51:57 +0000
treeherdermozilla-central@33d36bf6ca0c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester, maja_zf
bugs1226381
milestone47.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 1226381 - Marionette should print real path for profile location. r=automatedtester, r=maja_zf MozReview-Commit-ID: HOjxrXmnHoa
testing/marionette/client/marionette_driver/marionette.py
testing/marionette/harness/marionette/runner/base.py
--- a/testing/marionette/client/marionette_driver/marionette.py
+++ b/testing/marionette/client/marionette_driver/marionette.py
@@ -633,16 +633,24 @@ class Marionette(object):
             if busybox:
                 self.emulator.install_busybox(busybox=busybox)
             self.emulator.wait_for_system_message(self)
 
         # for callbacks from a protocol level 2 or lower remote,
         # we store the callback ID so it can be used by _send_emulator_result
         self.emulator_callback_id = None
 
+    @property
+    def profile_path(self):
+        if self.instance and self.instance.profile:
+            return self.instance.profile.profile
+        elif self.runner and self.runner.profile:
+            return self.runner.profile.profile
+
+
     def cleanup(self):
         if self.session:
             try:
                 self.delete_session()
             except (errors.MarionetteException, socket.error, IOError):
                 # These exceptions get thrown if the Marionette server
                 # hit an exception/died or the connection died. We can
                 # do no further server-side cleanup in this case.
--- a/testing/marionette/harness/marionette/runner/base.py
+++ b/testing/marionette/harness/marionette/runner/base.py
@@ -620,18 +620,16 @@ class BaseMarionetteTestRunner(object):
 
         # set up test handlers
         self.test_handlers = []
 
         self.reset_test_stats()
 
         self.logger.info('Using workspace for temporary data: '
                          '"{}"'.format(self.workspace_path))
-        if not self.workspace:
-            self.logger.info('Profile destination is TMP')
 
         if self.emulator and not self.logdir:
             self.logdir = os.path.join(self.workspace_path or '', 'logcat')
         if self.logdir and not os.access(self.logdir, os.F_OK):
                 os.mkdir(self.logdir)
 
         if not gecko_log:
             self.gecko_log = os.path.join(self.workspace_path or '', 'gecko.log')
@@ -812,16 +810,18 @@ setReq.onerror = function() {
             self.start_marionette()
             # Retrieve capabilities for later use
             if not self._capabilities:
                 self.capabilities
             # if we're working against a desktop version, we usually don't need
             # an external ip
             if self._capabilities['device'] == "desktop":
                 need_external_ip = False
+        self.logger.info('Initial Profile Destination is '
+                         '"{}"'.format(self.marionette.profile_path))
 
         # Gaia sets server_root and that means we shouldn't spin up our own httpd
         if not self.httpd:
             if self.server_root is None or os.path.isdir(self.server_root):
                 self.logger.info("starting httpd")
                 self.start_httpd(need_external_ip)
                 self.marionette.baseurl = self.httpd.get_url()
                 self.logger.info("running httpd on %s" % self.marionette.baseurl)
@@ -1104,9 +1104,9 @@ setReq.onerror = function() {
 
     def cleanup(self):
         if self.httpd:
             self.httpd.stop()
 
         if self.marionette:
             self.marionette.cleanup()
 
-    __del__ = cleanup
\ No newline at end of file
+    __del__ = cleanup