OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """ | 5 """ |
6 Classes in this file define additional actions that need to be taken to run a | 6 Classes in this file define additional actions that need to be taken to run a |
7 test under some kind of runtime error detection tool. | 7 test under some kind of runtime error detection tool. |
8 | 8 |
9 The interface is intended to be used as follows. | 9 The interface is intended to be used as follows. |
10 | 10 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 """AddressSanitizer tool.""" | 86 """AddressSanitizer tool.""" |
87 | 87 |
88 TMP_DIR = '/data/local/tmp/asan' | 88 TMP_DIR = '/data/local/tmp/asan' |
89 WRAPPER_NAME = 'asanwrapper.sh' | 89 WRAPPER_NAME = 'asanwrapper.sh' |
90 | 90 |
91 def __init__(self, adb): | 91 def __init__(self, adb): |
92 self._adb = adb | 92 self._adb = adb |
93 self._wrap_properties = ['wrap.com.google.android.apps.ch', | 93 self._wrap_properties = ['wrap.com.google.android.apps.ch', |
94 'wrap.org.chromium.native_test', | 94 'wrap.org.chromium.native_test', |
95 'wrap.org.chromium.content_shell', | 95 'wrap.org.chromium.content_shell', |
96 'wrap.org.chromium.chrome.testsh'] | 96 'wrap.org.chromium.chrome.testsh', |
| 97 'wrap.org.chromium.android_webvi'] |
97 # Configure AndroidCommands to run utils (such as md5sum_bin) under ASan. | 98 # Configure AndroidCommands to run utils (such as md5sum_bin) under ASan. |
98 # This is required because ASan is a compiler-based tool, and md5sum | 99 # This is required because ASan is a compiler-based tool, and md5sum |
99 # includes instrumented code from base. | 100 # includes instrumented code from base. |
100 adb.SetUtilWrapper(self.GetUtilWrapper()) | 101 adb.SetUtilWrapper(self.GetUtilWrapper()) |
101 | 102 |
102 def CopyFiles(self): | 103 def CopyFiles(self): |
103 """Copies ASan tools to the device.""" | 104 """Copies ASan tools to the device.""" |
104 files = (['tools/android/asan/asanwrapper.sh'] + | 105 files = (['tools/android/asan/asanwrapper.sh'] + |
105 glob('third_party/llvm-build/Release+Asserts/lib/clang/*/lib/' | 106 glob('third_party/llvm-build/Release+Asserts/lib/clang/*/lib/' |
106 'linux/libclang_rt.asan-arm-android.so')) | 107 'linux/libclang_rt.asan-arm-android.so')) |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 if not tool_name: | 255 if not tool_name: |
255 return BaseTool() | 256 return BaseTool() |
256 | 257 |
257 ctor = TOOL_REGISTRY.get(tool_name) | 258 ctor = TOOL_REGISTRY.get(tool_name) |
258 if ctor: | 259 if ctor: |
259 return ctor(adb) | 260 return ctor(adb) |
260 else: | 261 else: |
261 print 'Unknown tool %s, available tools: %s' % ( | 262 print 'Unknown tool %s, available tools: %s' % ( |
262 tool_name, ', '.join(sorted(TOOL_REGISTRY.keys()))) | 263 tool_name, ', '.join(sorted(TOOL_REGISTRY.keys()))) |
263 sys.exit(1) | 264 sys.exit(1) |
OLD | NEW |