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

Side by Side Diff: tools/valgrind/valgrind_test.py

Issue 22866018: valgrind: Fix running webkit-tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « tools/valgrind/chrome_tests.sh ('k') | 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 """Runs an exe through Valgrind and puts the intermediate files in a 5 """Runs an exe through Valgrind and puts the intermediate files in a
6 directory. 6 directory.
7 """ 7 """
8 8
9 import datetime 9 import datetime
10 import glob 10 import glob
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 350
351 def ToolCommand(self): 351 def ToolCommand(self):
352 """Get the valgrind command to run.""" 352 """Get the valgrind command to run."""
353 # Note that self._args begins with the exe to be run. 353 # Note that self._args begins with the exe to be run.
354 tool_name = self.ToolName() 354 tool_name = self.ToolName()
355 355
356 # Construct the valgrind command. 356 # Construct the valgrind command.
357 if self.SelfContained(): 357 if self.SelfContained():
358 proc = ["valgrind-%s.sh" % tool_name] 358 proc = ["valgrind-%s.sh" % tool_name]
359 else: 359 else:
360 proc = ["valgrind", "--tool=%s" % tool_name] 360 if 'CHROME_VALGRIND' in os.environ:
361 path = os.path.join(os.environ['CHROME_VALGRIND'], "bin", "valgrind")
362 else:
363 path = "valgrind"
364 proc = [path, "--tool=%s" % tool_name]
361 365
362 proc += ["--num-callers=%i" % int(self._options.num_callers)] 366 proc += ["--num-callers=%i" % int(self._options.num_callers)]
363 367
364 if self._options.trace_children: 368 if self._options.trace_children:
365 proc += ["--trace-children=yes"] 369 proc += ["--trace-children=yes"]
366 proc += ["--trace-children-skip='*dbus-daemon*'"] 370 proc += ["--trace-children-skip='*dbus-daemon*'"]
367 proc += ["--trace-children-skip='*dbus-launch*'"] 371 proc += ["--trace-children-skip='*dbus-launch*'"]
368 proc += ["--trace-children-skip='*perl*'"] 372 proc += ["--trace-children-skip='*perl*'"]
369 proc += ["--trace-children-skip='*python*'"] 373 proc += ["--trace-children-skip='*python*'"]
370 # This is really Python, but for some reason Valgrind follows it. 374 # This is really Python, but for some reason Valgrind follows it.
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 return Asan() 1223 return Asan()
1220 try: 1224 try:
1221 platform_name = common.PlatformNames()[0] 1225 platform_name = common.PlatformNames()[0]
1222 except common.NotImplementedError: 1226 except common.NotImplementedError:
1223 platform_name = sys.platform + "(Unknown)" 1227 platform_name = sys.platform + "(Unknown)"
1224 raise RuntimeError, "Unknown tool (tool=%s, platform=%s)" % (tool_name, 1228 raise RuntimeError, "Unknown tool (tool=%s, platform=%s)" % (tool_name,
1225 platform_name) 1229 platform_name)
1226 1230
1227 def CreateTool(tool): 1231 def CreateTool(tool):
1228 return ToolFactory().Create(tool) 1232 return ToolFactory().Create(tool)
OLDNEW
« no previous file with comments | « tools/valgrind/chrome_tests.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698