aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHemmo Nieminen <hemmo.nieminen@iki.fi>2016-05-17 21:50:34 +0300
committerHemmo Nieminen <hemmo.nieminen@iki.fi>2016-06-06 10:28:00 +0300
commit30bbcded235018bc7a353d67e93a5e5e5c7ec592 (patch)
tree7808c7f5a3ecbf91add53fbcb1d7f66607de8199
parent50609054ecfb18bbdaf1aa56fe2c801be95f31db (diff)
downloadmeson-30bbcded235018bc7a353d67e93a5e5e5c7ec592.zip
meson-30bbcded235018bc7a353d67e93a5e5e5c7ec592.tar.gz
meson-30bbcded235018bc7a353d67e93a5e5e5c7ec592.tar.bz2
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.
-rw-r--r--mesonbuild/scripts/meson_test.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/scripts/meson_test.py b/mesonbuild/scripts/meson_test.py
index 524dc7a..33b6165 100644
--- a/mesonbuild/scripts/meson_test.py
+++ b/mesonbuild/scripts/meson_test.py
@@ -110,8 +110,6 @@ 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
@@ -119,7 +117,10 @@ def run_single_test(wrap, test):
stde = None
returncode = -1
else:
- cmd = wrap + cmd + test.cmd_args
+ 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()
child_env = os.environ.copy()
child_env.update(test.env)