зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1307886 - [3.2] Extract xz-compressed libs for xpcshell and unit tests. r=glandium
This commit is contained in:
Родитель
e28632312d
Коммит
190e9ca088
|
@ -62,6 +62,13 @@ class RemoteCPPUnitTests(cppunittests.CPPUnitTests):
|
|||
remote_file = posixpath.join(self.remote_bin_dir, os.path.basename(info.filename))
|
||||
apk_contents.extract(info, tmpdir)
|
||||
local_file = os.path.join(tmpdir, info.filename)
|
||||
with open(local_file) as f:
|
||||
# Decompress xz-compressed file.
|
||||
if f.read(5)[1:] == '7zXZ':
|
||||
cmd = ['xz', '-df', '--suffix', '.so', local_file]
|
||||
subprocess.check_output(cmd)
|
||||
# xz strips the ".so" file suffix.
|
||||
os.rename(local_file[:-3], local_file)
|
||||
self.device.pushFile(local_file, remote_file)
|
||||
|
||||
elif self.options.local_lib:
|
||||
|
|
|
@ -453,6 +453,13 @@ class XPCShellRemote(xpcshell.XPCShellTests, object):
|
|||
remoteFile = remoteJoin(self.remoteBinDir, os.path.basename(info.filename))
|
||||
self.localAPKContents.extract(info, dir)
|
||||
localFile = os.path.join(dir, info.filename)
|
||||
with open(localFile) as f:
|
||||
# Decompress xz-compressed file.
|
||||
if f.read(5)[1:] == '7zXZ':
|
||||
cmd = ['xz', '-df', '--suffix', '.so', localFile]
|
||||
subprocess.check_output(cmd)
|
||||
# xz strips the ".so" file suffix.
|
||||
os.rename(localFile[:-3], localFile)
|
||||
self.device.pushFile(localFile, remoteFile)
|
||||
pushed_libs_count += 1
|
||||
finally:
|
||||
|
|
Загрузка…
Ссылка в новой задаче