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

Unified Diff: tools/test.py

Issue 43073: Add support for running the tests through valgrind. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 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 side-by-side diff with in-line comments
Download patch
« tools/run-valgrind.py ('K') | « tools/run-valgrind.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/test.py
===================================================================
--- tools/test.py (revision 1490)
+++ tools/test.py (working copy)
@@ -1078,6 +1078,8 @@
result.add_option("--simulator", help="Run tests with architecture simulator",
default='none')
result.add_option("--special-command", default=None)
+ result.add_option("--valgrind", help="Run tests through valgrind",
+ default=False, action="store_true")
result.add_option("--cat", help="Print the source of the tests",
default=False, action="store_true")
result.add_option("--warn-unused", help="Report unused rules",
@@ -1214,12 +1216,18 @@
path = SplitPath(arg)
paths.append(path)
+ # Check for --valgrind option. If enabled, we overwrite the special
+ # command flag with a command that uses the run-valgrind.py script.
+ if options.valgrind:
+ run_valgrind = join(workspace, "tools", "run-valgrind.py")
+ options.special_command = "python -u " + run_valgrind + " @"
+
# First build the required targets
buildspace = abspath('.')
context = Context(workspace, buildspace, VERBOSE,
join(buildspace, 'shell'),
options.timeout,
- GetSpecialCommandProcessor(options.special_command),
+ GetSpecialCommandProcessor(options.special_command),
options.suppress_dialogs)
if options.j != 1:
options.scons_flags += ['-j', str(options.j)]
« tools/run-valgrind.py ('K') | « tools/run-valgrind.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698