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

Unified Diff: build/android/pylib/valgrind_tools.py

Issue 11361125: Support running Android apk-based tests under ASan. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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 | « build/android/pylib/test_package_apk.py ('k') | tools/android/asan/asanwrapper.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/valgrind_tools.py
===================================================================
--- build/android/pylib/valgrind_tools.py (revision 166381)
+++ build/android/pylib/valgrind_tools.py (working copy)
@@ -84,7 +84,8 @@
class AddressSanitizerTool(BaseTool):
"""AddressSanitizer tool."""
- WRAPPER_PATH = '/system/bin/asanwrapper'
+ TMP_DIR = '/data/local/tmp/asan'
+ WRAPPER_NAME = 'asanwrapper.sh'
def __init__(self, adb):
self._adb = adb
@@ -93,18 +94,17 @@
def CopyFiles(self):
"""Copies ASan tools to the device."""
- files = ['system/lib/libasan_preload.so',
- 'system/bin/asanwrapper',
- 'system/bin/asan/app_process',
- 'system/bin/linker']
- android_product_out = os.environ['ANDROID_PRODUCT_OUT']
- self._adb.MakeSystemFolderWritable()
+ files = ['tools/android/asan/asanwrapper.sh',
+ 'third_party/llvm-build/Release+Asserts/lib/clang/3.2/lib/linux/' +
+ 'libclang_rt.asan-arm-android.so']
for f in files:
- self._adb.PushIfNeeded(os.path.join(android_product_out, f),
- os.path.join('/', f))
+ self._adb.PushIfNeeded(os.path.join(CHROME_DIR, f),
+ os.path.join(AddressSanitizerTool.TMP_DIR,
+ os.path.basename(f)))
def GetTestWrapper(self):
- return AddressSanitizerTool.WRAPPER_PATH
+ return os.path.join(AddressSanitizerTool.TMP_DIR,
+ AddressSanitizerTool.WRAPPER_NAME)
def GetUtilWrapper(self):
"""Returns the wrapper for utilities, such as forwarder.
@@ -112,9 +112,10 @@
AddressSanitizer wrapper must be added to all instrumented binaries,
including forwarder and the like. This can be removed if such binaries
were built without instrumentation. """
- return AddressSanitizerTool.WRAPPER_PATH
+ return self.GetTestWrapper()
def SetupEnvironment(self):
+ self._adb.EnableAdbRoot()
for prop in self._wrap_properties:
self._adb.RunShellCommand('setprop %s "logwrapper %s"' % (
prop, self.GetTestWrapper()))
« no previous file with comments | « build/android/pylib/test_package_apk.py ('k') | tools/android/asan/asanwrapper.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698