equal
deleted
inserted
replaced
24 # |
24 # |
25 TRACEBALL_SUFFIX = ".tar.bz2" |
25 TRACEBALL_SUFFIX = ".tar.bz2" |
26 |
26 |
27 |
27 |
28 |
28 |
29 def get_command_template(*arguments): |
29 def get_command_template(env, arguments=()): |
30 if Options.options.valgrind: |
30 if Options.options.valgrind: |
31 if Options.options.command_template: |
31 if Options.options.command_template: |
32 raise Utils.WafError("Options --command-template and --valgrind are conflicting") |
32 raise Utils.WafError("Options --command-template and --valgrind are conflicting") |
33 cmd = "valgrind --leak-check=full %s" |
33 if not env['VALGRIND']: |
|
34 raise Utils.WafError("valgrind is not installed") |
|
35 cmd = env['VALGRIND'] + " --leak-check=full --error-exitcode=1 %s" |
34 else: |
36 else: |
35 cmd = Options.options.command_template or '%s' |
37 cmd = Options.options.command_template or '%s' |
36 for arg in arguments: |
38 for arg in arguments: |
37 cmd = cmd + " " + arg |
39 cmd = cmd + " " + arg |
38 return cmd |
40 return cmd |