From aa3b2c88cd7e6ef91574a95e1bea9491245f3955 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Wed, 20 Mar 2019 16:58:01 +0300 Subject: [PATCH] wutils.py: raise WafError if both --valgrind and --command-template are specified even if force_no_valgrind is True, as it is for Python tests --- wutils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wutils.py b/wutils.py index 68f9555ca..3dded5430 100644 --- a/wutils.py +++ b/wutils.py @@ -110,9 +110,11 @@ def get_proc_env(os_env=None): def run_argv(argv, env, os_env=None, cwd=None, force_no_valgrind=False): proc_env = get_proc_env(os_env) + + if Options.options.valgrind and Options.options.command_template: + raise WafError("Options --command-template and --valgrind are conflicting") + if Options.options.valgrind and not force_no_valgrind: - if Options.options.command_template: - raise WafError("Options --command-template and --valgrind are conflicting") if not env['VALGRIND']: raise WafError("valgrind is not installed") # Use the first program found in the env['VALGRIND'] list