wutils.py
changeset 4119 9ffcf2400aa5
parent 4110 04170734fa8b
child 4137 c1303bd63eb5
--- 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: