Force valgrind to not be used for Python tests
This commit is contained in:
@@ -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
|
||||
|
||||
3
wscript
3
wscript
@@ -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."
|
||||
|
||||
|
||||
@@ -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']:
|
||||
|
||||
Reference in New Issue
Block a user