bug 669874 - add support for adb devicemanager to mochitest-remote make target r=jmaher
authorBrad Lassey <blassey@mozilla.com>
Thu, 07 Jul 2011 13:10:52 -0400
changeset 73301 cd7788463bd3388819e700f276c2f2ca32b5731f
parent 73300 16658637289055f1546cc8ddbc71149d6e7a0281
child 73302 82d7d9c93a0737acc734797eb4242b59e1fa2939
push id235
push userbzbarsky@mozilla.com
push dateTue, 27 Sep 2011 17:13:04 +0000
treeherdermozilla-beta@2d1e082d176a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs669874
milestone8.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 669874 - add support for adb devicemanager to mochitest-remote make target r=jmaher
build/mobile/devicemanagerADB.py
testing/mochitest/runtestsremote.py
testing/testsuite-targets.mk
--- a/build/mobile/devicemanagerADB.py
+++ b/build/mobile/devicemanagerADB.py
@@ -34,16 +34,17 @@ class DeviceManagerADB(DeviceManager):
 
   # external function
   # returns:
   #  success: directory name
   #  failure: None
   def mkDir(self, name):
     try:
       self.checkCmd(["shell", "mkdir", name])
+      self.chmodDir(name)
       return name
     except:
       return None
 
   # make directory structure on the device
   # external function
   # returns:
   #  success: directory structure that we created
--- a/testing/mochitest/runtestsremote.py
+++ b/testing/mochitest/runtestsremote.py
@@ -131,17 +131,17 @@ class RemoteOptions(MochitestOptions):
 
         options.webServer = options.remoteWebServer
 
         if (options.deviceIP == None):
             print "ERROR: you must provide a device IP"
             return None
 
         if (options.remoteLogFile == None):
-            options.remoteLogFile = options.remoteTestRoot + '/mochitest.log'
+            options.remoteLogFile = options.remoteTestRoot + '/logs/mochitest.log'
 
         if (options.remoteLogFile.count('/') < 1):
             options.remoteLogFile = options.remoteTestRoot + '/' + options.remoteLogFile
 
         # remoteAppPath or app must be specified to find the product to launch
         if (options.remoteAppPath and options.app):
             print "ERROR: You cannot specify both the remoteAppPath and the app setting"
             return None
@@ -331,16 +331,18 @@ def main():
         auto.setProduct(options.remoteProductName)
 
     mochitest = MochiRemote(auto, dm, options)
 
     options = parser.verifyOptions(options, mochitest)
     if (options == None):
         sys.exit(1)
     
+    logParent = os.path.dirname(options.remoteLogFile)
+    dm.mkDir(logParent);
     auto.setRemoteLog(options.remoteLogFile)
     auto.setServerInfo(options.webServer, options.httpPort, options.sslPort)
 
     procName = options.app.split('/')[-1]
     if (dm.processExist(procName)):
       dm.killProcess(procName)
 
     sys.exit(mochitest.runTests(options))
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -59,17 +59,17 @@ RUN_MOCHITEST = \
 	rm -f ./$@.log && \
 	$(PYTHON) _tests/testing/mochitest/runtests.py --autorun --close-when-done \
 	  --console-level=INFO --log-file=./$@.log --file-level=INFO \
 	  $(SYMBOLS_PATH) $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)
 
 RUN_MOCHITEST_REMOTE = \
 	rm -f ./$@.log && \
 	$(PYTHON) _tests/testing/mochitest/runtestsremote.py --autorun --close-when-done \
-	  --console-level=INFO --log-file=./$@.log --file-level=INFO \
+	  --console-level=INFO --log-file=./$@.log --file-level=INFO $(DM_FLAGS) \
 	  --app=$(ANDROID_PACKAGE_NAME) --deviceIP=${TEST_DEVICE} --xre-path=${MOZ_HOST_BIN} \
 	  $(SYMBOLS_PATH) $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)
 
 ifndef NO_FAIL_ON_TEST_ERRORS
 define CHECK_TEST_ERROR
   @errors=`grep "TEST-UNEXPECTED-" $@.log` ;\
   if test "$$errors" ; then \
 	  echo "$@ failed:"; \