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

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

Issue 1290773009: [Android] Remove android_commands and android_testrunner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: msg3: sullivan comment Created 5 years, 4 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 | « build/android/pylib/system_properties.py ('k') | third_party/android_testrunner/LICENSE » ('j') | 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 WRAPPER_NAME = '/system/bin/asanwrapper' 97 WRAPPER_NAME = '/system/bin/asanwrapper'
98 # Disable memcmp overlap check.There are blobs (gl drivers) 98 # Disable memcmp overlap check.There are blobs (gl drivers)
99 # on some android devices that use memcmp on overlapping regions, 99 # on some android devices that use memcmp on overlapping regions,
100 # nothing we can do about that. 100 # nothing we can do about that.
101 EXTRA_OPTIONS = 'strict_memcmp=0,use_sigaltstack=1' 101 EXTRA_OPTIONS = 'strict_memcmp=0,use_sigaltstack=1'
102 102
103 def __init__(self, device): 103 def __init__(self, device):
104 super(AddressSanitizerTool, self).__init__() 104 super(AddressSanitizerTool, self).__init__()
105 self._device = device 105 self._device = device
106 # Configure AndroidCommands to run utils (such as md5sum_bin) under ASan.
107 # This is required because ASan is a compiler-based tool, and md5sum
108 # includes instrumented code from base.
109 device.old_interface.SetUtilWrapper(self.GetUtilWrapper())
110 106
111 @classmethod 107 @classmethod
112 def CopyFiles(cls, device): 108 def CopyFiles(cls, device):
113 """Copies ASan tools to the device.""" 109 """Copies ASan tools to the device."""
114 libs = glob.glob(os.path.join(DIR_SOURCE_ROOT, 110 libs = glob.glob(os.path.join(DIR_SOURCE_ROOT,
115 'third_party/llvm-build/Release+Asserts/', 111 'third_party/llvm-build/Release+Asserts/',
116 'lib/clang/*/lib/linux/', 112 'lib/clang/*/lib/linux/',
117 'libclang_rt.asan-arm-android.so')) 113 'libclang_rt.asan-arm-android.so'))
118 assert len(libs) == 1 114 assert len(libs) == 1
119 subprocess.call( 115 subprocess.call(
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 return 291 return
296 292
297 clazz = TOOL_REGISTRY.get(tool_name) 293 clazz = TOOL_REGISTRY.get(tool_name)
298 if clazz: 294 if clazz:
299 clazz.CopyFiles(device) 295 clazz.CopyFiles(device)
300 else: 296 else:
301 print 'Unknown tool %s, available tools: %s' % ( 297 print 'Unknown tool %s, available tools: %s' % (
302 tool_name, ', '.join(sorted(TOOL_REGISTRY.keys()))) 298 tool_name, ', '.join(sorted(TOOL_REGISTRY.keys())))
303 sys.exit(1) 299 sys.exit(1)
304 300
OLDNEW
« no previous file with comments | « build/android/pylib/system_properties.py ('k') | third_party/android_testrunner/LICENSE » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698