Force valgrind to not be used for Python tests

This commit is contained in:
Gustavo J. A. M. Carneiro
2009-04-21 11:13:19 +01:00
parent 168515d842
commit ba5c9355f6
3 changed files with 6 additions and 5 deletions

View File

@@ -159,7 +159,7 @@ class regression_test_task(Task.TaskBase):
script = os.path.abspath(os.path.join('..', *os.path.split(program)))
argv = [self.env['PYTHON'], script] + arguments
try:
wutils.run_argv(argv, self.env, cwd=trace_output_path)
wutils.run_argv(argv, self.env, cwd=trace_output_path, force_no_valgrind=True)
except Utils.WafError, ex:
print >> sys.stderr, ex
return 1
@@ -191,7 +191,7 @@ class regression_test_task(Task.TaskBase):
script = os.path.abspath(os.path.join('..', *os.path.split(program)))
argv = [self.env['PYTHON'], script] + arguments
try:
retval = wutils.run_argv(argv, self.env, cwd=trace_output_path)
retval = wutils.run_argv(argv, self.env, cwd=trace_output_path, force_no_valgrind=True)
except Utils.WafError, ex:
print >> sys.stderr, ex
return 1

View File

@@ -525,7 +525,8 @@ def check(bld):
if env['ENABLE_PYTHON_BINDINGS']:
print "-- Running NS-3 Python bindings unit tests..."
wutils.run_argv([env['PYTHON'], os.path.join("utils", "python-unit-tests.py")], env, proc_env)
wutils.run_argv([env['PYTHON'], os.path.join("utils", "python-unit-tests.py")],
env, proc_env, force_no_valgrind=True)
else:
print "-- Skipping NS-3 Python bindings unit tests: Python bindings not enabled."

View File

@@ -114,9 +114,9 @@ def get_proc_env(os_env=None):
return proc_env
def run_argv(argv, env, os_env=None, cwd=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:
if Options.options.valgrind and not force_no_valgrind:
if Options.options.command_template:
raise Utils.WafError("Options --command-template and --valgrind are conflicting")
if not env['VALGRIND']: