Bug 1389805 - Apply elfhack -r to Android xpcshell libs; r=jmaher

This commit is contained in:
Geoff Brown 2018-04-10 11:14:16 -06:00
parent 42e0026deb
commit 1a314fba8e

View File

@ -436,6 +436,12 @@ class XPCShellRemote(xpcshell.XPCShellTests, object):
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
pushed_libs_count = 0
if self.options['localAPK']:
try:
@ -454,6 +460,10 @@ class XPCShellRemote(xpcshell.XPCShellTests, object):
subprocess.check_output(cmd)
# xz strips the ".so" file suffix.
os.rename(localFile[:-3], localFile)
# elfhack -r should provide better crash reports
if elfhack:
cmd = [elfhack, '-r', localFile]
subprocess.check_output(cmd)
self.device.push(localFile, remoteFile)
pushed_libs_count += 1
finally: