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

Side by Side Diff: build/android/pylib/valgrind_tools.py

Issue 12211070: Run locally-built Android utils under ASan (if built with ASan). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 7 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698