From 30bbcded235018bc7a353d67e93a5e5e5c7ec592 Mon Sep 17 00:00:00 2001 From: Hemmo Nieminen Date: Tue, 17 May 2016 21:50:34 +0300 Subject: 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. --- mesonbuild/scripts/meson_test.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'mesonbuild/scripts/meson_test.py') 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) -- cgit v1.1