Bug 1440714 - make sure to use root=True with chmod /sdcard/tests/, r=gbrown.
authorBob Clary <bclary@bclary.com>
Tue, 10 Apr 2018 23:12:28 -0700
changeset 468878 cabfd71439787edbe9990cb8e74292556bc174e5
parent 468877 a7054991fa0cc83476b63e1e04f8551a1e75b74a
child 468879 7bdb7ce278c1ea4de5658f14ff3585b7bdedb0fb
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgbrown
bugs1440714
milestone61.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 1440714 - make sure to use root=True with chmod /sdcard/tests/, r=gbrown.
js/src/tests/lib/jittests.py
layout/tools/reftest/remotereftest.py
testing/mochitest/runtestsremote.py
testing/remotecppunittests.py
testing/xpcshell/remotexpcshelltests.py
--- a/js/src/tests/lib/jittests.py
+++ b/js/src/tests/lib/jittests.py
@@ -717,17 +717,17 @@ def run_tests_remote(tests, num_tests, p
     jit_tests_dir = posixpath.join(options.remote_test_root, 'jit-tests')
     options.remote_test_root = posixpath.join(jit_tests_dir, 'jit-tests')
 
     # Push js shell and libraries.
     device.rm(jit_tests_dir, force=True, recursive=True)
     device.mkdir(options.remote_test_root, parents=True)
     push_libs(options, device)
     push_progs(options, device, [prefix[0]])
-    device.chmod(options.remote_test_root, recursive=True)
+    device.chmod(options.remote_test_root, recursive=True, root=True)
 
     JitTest.CacheDir = posixpath.join(options.remote_test_root, '.js-cache')
     device.mkdir(JitTest.CacheDir)
 
     device.push(JS_TESTS_DIR, posixpath.join(jit_tests_dir, 'tests'),
                 timeout=600)
 
     device.push(os.path.dirname(TEST_DIR), options.remote_test_root,
--- a/layout/tools/reftest/remotereftest.py
+++ b/layout/tools/reftest/remotereftest.py
@@ -310,30 +310,30 @@ class RemoteReftest(RefTest):
         # reftest pages at 1.0 zoom, rather than zooming to fit the CSS viewport.
         prefs["apz.allow_zooming"] = False
 
         # Set the extra prefs.
         profile.set_preferences(prefs)
 
         try:
             self.device.push(profileDir, options.remoteProfile)
-            self.device.chmod(options.remoteProfile, recursive=True)
+            self.device.chmod(options.remoteProfile, recursive=True, root=True)
         except Exception:
             print "Automation Error: Failed to copy profiledir to device"
             raise
 
         return profile
 
     def copyExtraFilesToProfile(self, options, profile):
         profileDir = profile.profile
         RefTest.copyExtraFilesToProfile(self, options, profile)
         if len(os.listdir(profileDir)) > 0:
             try:
                 self.device.push(profileDir, options.remoteProfile)
-                self.device.chmod(options.remoteProfile, recursive=True)
+                self.device.chmod(options.remoteProfile, recursive=True, root=True)
             except Exception:
                 print "Automation Error: Failed to copy extra files to device"
                 raise
 
     def printDeviceInfo(self, printLogcat=False):
         try:
             if printLogcat:
                 logcat = self.device.get_logcat(filter_out_regexps=fennecLogcatFilters)
--- a/testing/mochitest/runtestsremote.py
+++ b/testing/mochitest/runtestsremote.py
@@ -211,17 +211,17 @@ class MochiRemote(MochitestDesktop):
             ignoreSSLTunnelExts=True)
         restoreRemotePaths()
 
     def buildProfile(self, options):
         restoreRemotePaths = self.switchToLocalPaths(options)
         if options.testingModulesDir:
             try:
                 self.device.push(options.testingModulesDir, self.remoteModulesDir)
-                self.device.chmod(self.remoteModulesDir, recursive=True)
+                self.device.chmod(self.remoteModulesDir, recursive=True, root=True)
             except Exception:
                 self.log.error(
                     "Automation Error: Unable to copy test modules to device.")
                 raise
             savedTestingModulesDir = options.testingModulesDir
             options.testingModulesDir = self.remoteModulesDir
         else:
             savedTestingModulesDir = None
@@ -239,17 +239,17 @@ class MochiRemote(MochitestDesktop):
         options.logFile = self.remoteLogFile
         options.profilePath = self.localProfile
         env["MOZ_HIDE_RESULTS_TABLE"] = "1"
         retVal = MochitestDesktop.buildURLOptions(self, options, env)
 
         # we really need testConfig.js (for browser chrome)
         try:
             self.device.push(options.profilePath, self.remoteProfile)
-            self.device.chmod(self.remoteProfile, recursive=True)
+            self.device.chmod(self.remoteProfile, recursive=True, root=True)
         except Exception:
             self.log.error("Automation Error: Unable to copy profile to device.")
             raise
 
         options.profilePath = self.remoteProfile
         options.logFile = saveLogFile
         return retVal
 
--- a/testing/remotecppunittests.py
+++ b/testing/remotecppunittests.py
@@ -39,17 +39,17 @@ class RemoteCPPUnitTests(cppunittests.CP
             self.setup_bin(progs)
 
     def setup_bin(self, progs):
         self.device.rm(self.remote_test_root, force=True, recursive=True)
         self.device.mkdir(self.remote_home_dir, parents=True)
         self.device.mkdir(self.remote_tmp_dir)
         self.push_libs()
         self.push_progs(progs)
-        self.device.chmod(self.remote_bin_dir, recursive=True)
+        self.device.chmod(self.remote_bin_dir, recursive=True, root=True)
 
     def push_libs(self):
         if self.options.local_apk:
             with mozfile.TemporaryDirectory() as tmpdir:
                 apk_contents = ZipFile(self.options.local_apk)
 
                 for info in apk_contents.infolist():
                     if info.filename.endswith(".so"):
--- a/testing/xpcshell/remotexpcshelltests.py
+++ b/testing/xpcshell/remotexpcshelltests.py
@@ -350,17 +350,17 @@ class XPCShellRemote(xpcshell.XPCShellTe
         f.writelines([
             "#!/system/bin/sh\n",
             "rm -r \"$1\"\n",
             "mkdir \"$1\"\n"])
         f.close()
         self.device.push(localWrapper, self.remoteClearDirScript)
         os.remove(localWrapper)
 
-        self.device.chmod(self.remoteBinDir, recursive=True)
+        self.device.chmod(self.remoteBinDir, recursive=True, root=True)
 
     def buildEnvironment(self):
         self.buildCoreEnvironment()
         self.setLD_LIBRARY_PATH()
         self.env["MOZ_LINKER_CACHE"] = self.remoteBinDir
         if self.options['localAPK'] and self.appRoot:
             self.env["GRE_HOME"] = self.appRoot
         self.env["XPCSHELL_TEST_PROFILE_DIR"] = self.profileDir