Bug 1499915 - Use elfhack from the build for Android xpcshell tests r=froydnj
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 24 Oct 2018 13:45:50 +0000
changeset 442887 fbe393405a4ac2fccae94a26d173fc9fbe30e276
parent 442886 550a527e90ee52ce0ec3095b2fd977446ee2f5f2
child 442888 2ab590b3ed3f6534c07bae569ec3c84311b1e82b
push id71689
push usermh@glandium.org
push dateWed, 24 Oct 2018 22:11:25 +0000
treeherderautoland@fbe393405a4a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1499915
milestone65.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 1499915 - Use elfhack from the build for Android xpcshell tests r=froydnj Android xpcshell tests run `elfhack -r`, and do so by using an elfhack binary from an archive downloaded via tooltool (which contains other things). Instead, we just put the elfhack binary in the target.common.tests.tar.gz archive, and make the xpcshell harness use it from there instead, allowing to pick in-tree changes to elfhack. Depends on D9623 Differential Revision: https://phabricator.services.mozilla.com/D9624
python/mozbuild/mozbuild/action/test_archive.py
testing/xpcshell/remotexpcshelltests.py
--- a/python/mozbuild/mozbuild/action/test_archive.py
+++ b/python/mozbuild/mozbuild/action/test_archive.py
@@ -298,17 +298,25 @@ ARCHIVE_FILES = {
             ],
             'dest': 'bin/components',
         },
         {
             'source': buildconfig.topsrcdir,
             'base': 'build/pgo/certs',
             'pattern': '**',
             'dest': 'certs',
-        }
+        },
+        {
+            'source': buildconfig.topobjdir,
+            'base': 'build/unix/elfhack',
+            'patterns': [
+                'elfhack%s' % buildconfig.substs['BIN_SUFFIX'],
+            ],
+            'dest': 'bin',
+        },
     ],
     'cppunittest': [
         {
             'source': STAGE,
             'base': '',
             'pattern': 'cppunittest/**',
         },
         # We don't ship these files if startup cache is disabled, which is
--- a/testing/xpcshell/remotexpcshelltests.py
+++ b/testing/xpcshell/remotexpcshelltests.py
@@ -425,22 +425,19 @@ class XPCShellRemote(xpcshell.XPCShellTe
             remoteFile = posixpath.join(self.remoteBinDir,
                                         os.path.basename(self.options['localAPK']))
             self.device.push(self.options['localAPK'], remoteFile)
             self.device.chmod(remoteFile, root=True)
 
         self.pushLibs()
 
     def pushLibs(self):
-        elfhack = None
-        xrePath = self.options.get('xrePath')
-        if xrePath:
-            elfhack = os.path.join(xrePath, 'elfhack')
-            if not os.path.exists(elfhack):
-                elfhack = None
+        elfhack = os.path.join(self.localBin, 'elfhack')
+        if not os.path.exists(elfhack):
+            elfhack = None
         pushed_libs_count = 0
         if self.options['localAPK']:
             try:
                 dir = tempfile.mkdtemp()
                 for info in self.localAPKContents.infolist():
                     if info.filename.endswith(".so"):
                         print("Pushing %s.." % info.filename, file=sys.stderr)
                         remoteFile = posixpath.join(self.remoteBinDir,