diff options
| author | Hemmo Nieminen <hemmo.nieminen@iki.fi> | 2016-05-17 21:50:34 +0300 |
|---|---|---|
| committer | Hemmo Nieminen <hemmo.nieminen@iki.fi> | 2016-06-06 10:28:00 +0300 |
| commit | 30bbcded235018bc7a353d67e93a5e5e5c7ec592 (patch) | |
| tree | 7808c7f5a3ecbf91add53fbcb1d7f66607de8199 /mesonbuild/scripts/meson_test.py | |
| parent | 50609054ecfb18bbdaf1aa56fe2c801be95f31db (diff) | |
| download | meson-30bbcded235018bc7a353d67e93a5e5e5c7ec592.tar.gz | |
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.
Diffstat (limited to 'mesonbuild/scripts/meson_test.py')
| -rw-r--r-- | mesonbuild/scripts/meson_test.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/scripts/meson_test.py b/mesonbuild/scripts/meson_test.py index 524dc7a2b..33b616526 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) |
