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

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

Issue 138153003: Switch to the "new" way of ASan deployment on Android devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | tools/android/asan/asan_device_setup.sh » ('j') | tools/android/asan/asan_device_setup.sh » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/valgrind_tools.py
diff --git a/build/android/pylib/valgrind_tools.py b/build/android/pylib/valgrind_tools.py
index c71b873b67f6754b5c0772be508701ebeaf5eec0..cc354d516543b9e4c4a35d64811c54e04f64887f 100644
--- a/build/android/pylib/valgrind_tools.py
+++ b/build/android/pylib/valgrind_tools.py
@@ -22,6 +22,7 @@ Call tool.CleanUpEnvironment().
"""
import os.path
+import subprocess
import sys
from glob import glob
@@ -85,16 +86,10 @@ class BaseTool(object):
class AddressSanitizerTool(BaseTool):
"""AddressSanitizer tool."""
- TMP_DIR = '/data/local/tmp/asan'
- WRAPPER_NAME = 'asanwrapper.sh'
+ WRAPPER_NAME = '/system/bin/asanwrapper'
def __init__(self, adb):
self._adb = adb
- self._wrap_properties = ['wrap.com.google.android.apps.ch',
- 'wrap.org.chromium.native_test',
- 'wrap.org.chromium.content_shell',
- 'wrap.org.chromium.chrome.testsh',
- 'wrap.org.chromium.android_webvi']
# Configure AndroidCommands to run utils (such as md5sum_bin) under ASan.
# This is required because ASan is a compiler-based tool, and md5sum
# includes instrumented code from base.
@@ -102,17 +97,12 @@ class AddressSanitizerTool(BaseTool):
def CopyFiles(self):
"""Copies ASan tools to the device."""
- files = (['tools/android/asan/asanwrapper.sh'] +
- glob('third_party/llvm-build/Release+Asserts/lib/clang/*/lib/'
- 'linux/libclang_rt.asan-arm-android.so'))
- for f in files:
- self._adb.PushIfNeeded(os.path.join(DIR_SOURCE_ROOT, f),
- os.path.join(AddressSanitizerTool.TMP_DIR,
- os.path.basename(f)))
+ subprocess.call(os.path.join(DIR_SOURCE_ROOT,
+ "tools/android/asan/asan_device_setup.sh"))
Alexander Potapenko 2014/01/17 12:43:50 Looks like this script uses single quotes for stri
eugenis 2014/01/17 12:48:08 Done.
+ self._adb.Reboot()
eugenis 2014/01/17 12:32:10 Reboot is required after asan_device_setup.sh. Unf
Alexander Potapenko 2014/01/17 12:43:50 Please put this into a comment.
eugenis 2014/01/17 12:48:08 Done.
def GetTestWrapper(self):
- return os.path.join(AddressSanitizerTool.TMP_DIR,
- AddressSanitizerTool.WRAPPER_NAME)
+ return AddressSanitizerTool.WRAPPER_NAME
def GetUtilWrapper(self):
"""Returns the wrapper for utilities, such as forwarder.
@@ -124,15 +114,9 @@ class AddressSanitizerTool(BaseTool):
def SetupEnvironment(self):
self._adb.EnableAdbRoot()
- self._adb.RunShellCommand('setenforce 0')
- for prop in self._wrap_properties:
- self._adb.RunShellCommand('setprop %s "logwrapper %s"' % (
- prop, self.GetTestWrapper()))
SetChromeTimeoutScale(self._adb, self.GetTimeoutScale())
def CleanUpEnvironment(self):
- for prop in self._wrap_properties:
- self._adb.RunShellCommand('setprop %s ""' % (prop,))
SetChromeTimeoutScale(self._adb, None)
def GetTimeoutScale(self):
« no previous file with comments | « no previous file | tools/android/asan/asan_device_setup.sh » ('j') | tools/android/asan/asan_device_setup.sh » ('J')

Powered by Google App Engine
This is Rietveld 408576698