Bug 1596967 - In Android xpcshell tests, do not push tests to existing directory; r=bc
authorGeoff Brown <gbrown@mozilla.com>
Mon, 18 Nov 2019 18:55:45 +0000
changeset 502454 d8bdee06190fa6b2df2625dcfb3241c69ac1914b
parent 502453 57308405ef981e915faa3493c44207eb7a25cef7
child 502455 9d2c4851e407f7f49d01549f295f44094ca0a525
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbc
bugs1596967
milestone72.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 1596967 - In Android xpcshell tests, do not push tests to existing directory; r=bc Currently the xpcshell harness ensures the remote scripts directory, /sdcard/tests/xpc, is deleted, then re-creates it, then pushes to it. In this bug, confusion arises when a pre-push check for directory existence intermittently fails (reports the directory does not exist when in fact it does). Let's simplify this sequence by simply ensuring that the directory has been deleted, then push to it. Differential Revision: https://phabricator.services.mozilla.com/D53684
testing/xpcshell/remotexpcshelltests.py
--- a/testing/xpcshell/remotexpcshelltests.py
+++ b/testing/xpcshell/remotexpcshelltests.py
@@ -468,17 +468,17 @@ class XPCShellRemote(xpcshell.XPCShellTe
             self.device.push(self.testingModulesDir, self.remoteModulesDir)
             self.device.chmod(self.remoteModulesDir, root=True)
 
     def setupTestDir(self):
         print('pushing %s' % self.xpcDir)
         # The tests directory can be quite large: 5000 files and growing!
         # Sometimes - like on a low-end aws instance running an emulator - the push
         # may exceed the default 5 minute timeout, so we increase it here to 10 minutes.
-        self.initDir(self.remoteScriptsDir)
+        self.device.rm(self.remoteScriptsDir, recursive=True, force=True, timeout=None, root=True)
         self.device.push(self.xpcDir, self.remoteScriptsDir, timeout=600)
         self.device.chmod(self.remoteScriptsDir, recursive=True, root=True)
 
     def buildTestList(self, test_tags=None, test_paths=None, verify=False):
         xpcshell.XPCShellTests.buildTestList(
             self, test_tags=test_tags, test_paths=test_paths, verify=verify)
         uniqueTestPaths = set([])
         for test in self.alltests: