| 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..3775bf3a728a11723321c0382297829bc588245c 100644
|
| --- a/build/android/pylib/valgrind_tools.py
|
| +++ b/build/android/pylib/valgrind_tools.py
|
| @@ -25,7 +25,7 @@ import os.path
|
| import sys
|
| from glob import glob
|
|
|
| -from constants import DIR_SOURCE_ROOT
|
| +from pylib.constants import DIR_SOURCE_ROOT
|
|
|
|
|
| def SetChromeTimeoutScale(adb, scale):
|
| @@ -41,6 +41,10 @@ def SetChromeTimeoutScale(adb, scale):
|
| class BaseTool(object):
|
| """A tool that does nothing."""
|
|
|
| + def __init__(self):
|
| + """Does nothing."""
|
| + pass
|
| +
|
| def GetTestWrapper(self):
|
| """Returns a string that is to be prepended to the test command line."""
|
| return ''
|
| @@ -89,6 +93,7 @@ class AddressSanitizerTool(BaseTool):
|
| WRAPPER_NAME = 'asanwrapper.sh'
|
|
|
| def __init__(self, adb):
|
| + super(AddressSanitizerTool, self).__init__()
|
| self._adb = adb
|
| self._wrap_properties = ['wrap.com.google.android.apps.ch',
|
| 'wrap.org.chromium.native_test',
|
| @@ -147,6 +152,7 @@ class ValgrindTool(BaseTool):
|
| VGLOGS_DIR = '/data/local/tmp/vglogs'
|
|
|
| def __init__(self, adb):
|
| + super(ValgrindTool, self).__init__()
|
| self._adb = adb
|
| # exactly 31 chars, SystemProperties::PROP_NAME_MAX
|
| self._wrap_properties = ['wrap.com.google.android.apps.ch',
|
| @@ -237,11 +243,11 @@ class TSanTool(ValgrindTool):
|
|
|
|
|
| TOOL_REGISTRY = {
|
| - 'memcheck': lambda x: MemcheckTool(x),
|
| - 'memcheck-renderer': lambda x: MemcheckTool(x),
|
| - 'tsan': lambda x: TSanTool(x),
|
| - 'tsan-renderer': lambda x: TSanTool(x),
|
| - 'asan': lambda x: AddressSanitizerTool(x),
|
| + 'memcheck': MemcheckTool,
|
| + 'memcheck-renderer': MemcheckTool,
|
| + 'tsan': TSanTool,
|
| + 'tsan-renderer': TSanTool,
|
| + 'asan': AddressSanitizerTool,
|
| }
|
|
|
|
|
|
|