[mq]: mochitestFix draft
authorAlastor Wu <alwu@mozilla.com>
Thu, 11 May 2017 17:33:58 +0800
changeset 576819 1197d632f8ea2376437b4f73435513ee70662195
parent 575938 d8762cb967423618ff0a488f14745f60964e5c49
child 576820 27460cf32ac47d3b6fcae39a74d54fad6cb421d4
child 576827 6cfa4dd1662353a5507ebaaaecf1179dad5add29
push id58491
push useralwu@mozilla.com
push dateFri, 12 May 2017 10:11:49 +0000
milestone55.0a1
[mq]: mochitestFix MozReview-Commit-ID: LAVzDfJ3WUA
build/mobile/remoteautomation.py
testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py
--- a/build/mobile/remoteautomation.py
+++ b/build/mobile/remoteautomation.py
@@ -145,19 +145,19 @@ class RemoteAutomation(Automation):
 
     def checkForANRs(self):
         traces = "/data/anr/traces.txt"
         if self._devicemanager.fileExists(traces):
             try:
                 t = self._devicemanager.pullFile(traces)
                 if t:
                     stripped = t.strip()
-                    if len(stripped) > 0:
-                        print "Contents of %s:" % traces
-                        print t
+                    #if len(stripped) > 0:
+                        # print "Contents of %s:" % traces
+                        # print t
                 # Once reported, delete traces
                 self.deleteANRs()
             except DMError:
                 print "Error pulling %s" % traces
             except IOError:
                 print "Error pulling %s" % traces
         else:
             print "%s not found" % traces
--- a/testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py
+++ b/testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py
@@ -425,26 +425,28 @@ class DeviceManagerADB(DeviceManager):
         if args != "":
             acmd.append("--es")
             acmd.append("args")
             acmd.append(args)
         if env != '' and env is not None:
             envCnt = 0
             # env is expected to be a dict of environment variables
             for envkey, envval in env.iteritems():
-                acmd.append("--es")
-                acmd.append("env" + str(envCnt))
-                acmd.append(envkey + "=" + envval)
-                envCnt += 1
+                if envkey != "MOZ_PROCESS_LOG":
+                    acmd.append("--es")
+                    acmd.append("env" + str(envCnt))
+                    acmd.append(envkey + "=" + envval)
+                    envCnt += 1
         if uri != "":
             acmd.append("-d")
             acmd.append(uri)
 
         acmd = ["shell", ' '.join(map(lambda x: '"' + x + '"', ["am", "start"] + acmd))]
         self._logger.info(acmd)
+        print(acmd)
         self._checkCmd(acmd)
         return outputFile
 
     def killProcess(self, appname, sig=None):
         try:
             self.shellCheckOutput(["am", "force-stop", appname], timeout=self.short_timeout)
         except:
             # no problem - will kill it instead