meson_test: Fix a bug in valgrind argument handling.

Do not modify the wrap command argument from the calling function.
Appending the valgrind arguments to the wrap list argument will cause all
the valgrind arguments to cumulate from all the tests to the wrapper
command itself.
pull/582/head
Hemmo Nieminen 9 years ago
parent 50609054ec
commit 30bbcded23
  1. 5
      mesonbuild/scripts/meson_test.py

@ -110,14 +110,15 @@ def run_single_test(wrap, test):
cmd = [test.exe_runner] + test.fname
else:
cmd = test.fname
if len(wrap) > 0 and 'valgrind' in wrap[0]:
wrap += test.valgrind_args
if cmd is None:
res = 'SKIP'
duration = 0.0
stdo = 'Not run because can not execute cross compiled binaries.'
stde = None
returncode = -1
else:
if len(wrap) > 0 and 'valgrind' in wrap[0]:
cmd = wrap + test.valgrind_args + cmd + test.cmd_args
else:
cmd = wrap + cmd + test.cmd_args
starttime = time.time()

Loading…
Cancel
Save