Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: testing/android/generate_native_test.py

Issue 10414034: APK tests: Strip the shlibs before bundling in APK. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable pylint warning Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/android/generate_native_test.py
diff --git a/testing/android/generate_native_test.py b/testing/android/generate_native_test.py
index 7b7853d2894e2f55f43421ee829813cbc271d520..2062144bcd88f265302cba1907c61fdd34474363 100755
--- a/testing/android/generate_native_test.py
+++ b/testing/android/generate_native_test.py
@@ -21,6 +21,11 @@ import shutil
import subprocess
import sys
+# cmd_helper.py is under ../../build/android/
+sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)), '..',
+ '..', 'build', 'android'))
+import cmd_helper # pylint: disable=F0401
+
class NativeTestApkGenerator(object):
"""Generate a native test apk source tree.
@@ -118,8 +123,10 @@ class NativeTestApkGenerator(object):
if not os.path.exists(destdir):
os.makedirs(destdir)
dest = os.path.join(destdir, os.path.basename(self._native_library))
- logging.warn('%s --> %s' % (self._native_library, dest))
- shutil.copyfile(self._native_library, dest)
+ logging.warn('strip %s --> %s' % (self._native_library, dest))
+ strip = os.environ['STRIP']
+ cmd_helper.RunCmd(
+ [strip, '--strip-unneeded', self._native_library, '-o', dest])
if self._jars:
destdir = os.path.join(self._output_directory, 'libs')
if not os.path.exists(destdir):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698