Bug 799863 (3/3) - use dm.pushFile(file, dir/file) instead of dm.pushFile(file, dir); r=wlach
authorGeoff Brown <gbrown@mozilla.com>
Tue, 30 Oct 2012 15:21:43 -0600
changeset 111955 d2fd1f7c6c15cd5774fe6cf0abe20a781ed1a432
parent 111954 8d1f8e125da17f0fdf5c61b519d54b10d253e122
child 111956 434c6bdec0bb8c1891fe909b2eaf59b4b46fd2f1
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewerswlach
bugs799863
milestone19.0a1
Bug 799863 (3/3) - use dm.pushFile(file, dir/file) instead of dm.pushFile(file, dir); r=wlach
testing/xpcshell/remotexpcshelltests.py
--- a/testing/xpcshell/remotexpcshelltests.py
+++ b/testing/xpcshell/remotexpcshelltests.py
@@ -73,38 +73,44 @@ class XPCShellRemote(xpcshell.XPCShellTe
         if (not self.device.dirExists(remotePrefDir)):
           self.device.mkDirs(self.remoteJoin(remotePrefDir, "extra"))
         if (not self.device.dirExists(self.remoteScriptsDir)):
           self.device.mkDir(self.remoteScriptsDir)
         if (not self.device.dirExists(self.remoteComponentsDir)):
           self.device.mkDir(self.remoteComponentsDir)
 
         local = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'head.js')
-        self.device.pushFile(local, self.remoteScriptsDir)
+        remoteFile = self.remoteJoin(self.remoteScriptsDir, "head.js")
+        self.device.pushFile(local, remoteFile)
 
         localBin = os.path.join(self.options.objdir, "dist/bin")
         if not os.path.exists(localBin):
           localBin = os.path.join(self.options.objdir, "bin")
           if not os.path.exists(localBin):
             print >>sys.stderr, "Error: could not find bin in objdir"
             sys.exit(1)
 
         local = os.path.join(localBin, "xpcshell")
-        self.device.pushFile(local, self.remoteBinDir)
+        remoteFile = self.remoteJoin(self.remoteBinDir, "xpcshell")
+        self.device.pushFile(local, remoteFile)
 
         local = os.path.join(localBin, "components/httpd.js")
-        self.device.pushFile(local, self.remoteComponentsDir)
+        remoteFile = self.remoteJoin(self.remoteComponentsDir, "httpd.js")
+        self.device.pushFile(local, remoteFile)
 
         local = os.path.join(localBin, "components/httpd.manifest")
-        self.device.pushFile(local, self.remoteComponentsDir)
+        remoteFile = self.remoteJoin(self.remoteComponentsDir, "httpd.manifest")
+        self.device.pushFile(local, remoteFile)
 
         local = os.path.join(localBin, "components/test_necko.xpt")
-        self.device.pushFile(local, self.remoteComponentsDir)
+        remoteFile = self.remoteJoin(self.remoteComponentsDir, "test_necko.xpt")
+        self.device.pushFile(local, remoteFile)
 
-        self.device.pushFile(self.options.localAPK, self.remoteBinDir)
+        remoteFile = self.remoteJoin(self.remoteBinDir, os.path.basename(self.options.localAPK))
+        self.device.pushFile(self.options.localAPK, remoteFile)
 
         self.pushLibs()
 
         self.device.chmodDir(self.remoteBinDir)
 
     def pushLibs(self):
         if self.options.localAPK:
           localLib = os.path.join(self.options.objdir, "dist/fennec")
@@ -116,25 +122,27 @@ class XPCShellRemote(xpcshell.XPCShellTe
         else:
           localLib = os.path.join(self.options.objdir, 'dist/bin')
 
         for file in os.listdir(localLib):
           if (file.endswith(".so")):
             print >> sys.stderr, "Pushing %s.." % file
             if 'libxul' in file:
               print >> sys.stderr, "This is a big file, it could take a while."
-            self.device.pushFile(os.path.join(localLib, file), self.remoteBinDir)
+            remoteFile = self.remoteJoin(self.remoteBinDir, file)
+            self.device.pushFile(os.path.join(localLib, file), remoteFile)
 
         # Additional libraries may be found in a sub-directory such as "lib/armeabi-v7a"
         localArmLib = os.path.join(localLib, "lib")
         if os.path.exists(localArmLib):
           for root, dirs, files in os.walk(localArmLib):
             for file in files:
               if (file.endswith(".so")):
-                self.device.pushFile(os.path.join(root, file), self.remoteBinDir)
+                remoteFile = self.remoteJoin(self.remoteBinDir, file)
+                self.device.pushFile(os.path.join(root, file), remoteFile)
 
 
     def setupTestDir(self):
         xpcDir = os.path.join(self.options.objdir, "_tests/xpcshell")
         self.device.pushDir(xpcDir, self.remoteScriptsDir)
 
     def buildTestList(self):
         xpcshell.XPCShellTests.buildTestList(self)