--- a/wutils.py Sat Jan 24 15:51:09 2009 +0000
+++ b/wutils.py Sat Jan 24 18:09:29 2009 +0000
@@ -26,11 +26,13 @@
-def get_command_template(*arguments):
+def get_command_template(env, arguments=()):
if Options.options.valgrind:
if Options.options.command_template:
raise Utils.WafError("Options --command-template and --valgrind are conflicting")
- cmd = "valgrind --leak-check=full %s"
+ if not env['VALGRIND']:
+ raise Utils.WafError("valgrind is not installed")
+ cmd = env['VALGRIND'] + " --leak-check=full --error-exitcode=1 %s"
else:
cmd = Options.options.command_template or '%s'
for arg in arguments: