Chromium Code Reviews| 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): |