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

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

Issue 1288993002: Revert of [Android] Remove android_commands and android_testrunner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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())
106 110
107 @classmethod 111 @classmethod
108 def CopyFiles(cls, device): 112 def CopyFiles(cls, device):
109 """Copies ASan tools to the device.""" 113 """Copies ASan tools to the device."""
110 libs = glob.glob(os.path.join(DIR_SOURCE_ROOT, 114 libs = glob.glob(os.path.join(DIR_SOURCE_ROOT,
111 'third_party/llvm-build/Release+Asserts/', 115 'third_party/llvm-build/Release+Asserts/',
112 'lib/clang/*/lib/linux/', 116 'lib/clang/*/lib/linux/',
113 'libclang_rt.asan-arm-android.so')) 117 'libclang_rt.asan-arm-android.so'))
114 assert len(libs) == 1 118 assert len(libs) == 1
115 subprocess.call( 119 subprocess.call(
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 return 295 return
292 296
293 clazz = TOOL_REGISTRY.get(tool_name) 297 clazz = TOOL_REGISTRY.get(tool_name)
294 if clazz: 298 if clazz:
295 clazz.CopyFiles(device) 299 clazz.CopyFiles(device)
296 else: 300 else:
297 print 'Unknown tool %s, available tools: %s' % ( 301 print 'Unknown tool %s, available tools: %s' % (
298 tool_name, ', '.join(sorted(TOOL_REGISTRY.keys()))) 302 tool_name, ', '.join(sorted(TOOL_REGISTRY.keys())))
299 sys.exit(1) 303 sys.exit(1)
300 304
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