diff --git a/regression.py b/regression.py index 2e5b7a2d3..fd0a6fdfe 100644 --- a/regression.py +++ b/regression.py @@ -84,7 +84,7 @@ class regression_test_task(Task.TaskBase): program = getattr(mod, "program", short_name) if hasattr(mod, 'may_run'): - reason_cannot_run = mod.may_run(self.env) + reason_cannot_run = mod.may_run(self.env, Options.options) else: reason_cannot_run = None if reason_cannot_run: diff --git a/regression/tests/test-csma-bridge.py b/regression/tests/test-csma-bridge.py index e0905d33e..245f5b6d1 100644 --- a/regression/tests/test-csma-bridge.py +++ b/regression/tests/test-csma-bridge.py @@ -4,7 +4,7 @@ import os.path -def may_run(env): +def may_run(env, options): """Returns 0 when it can run, return non-zero or string (reason) when it cannot run""" if env['ENABLE_PYTHON_BINDINGS']: return 0 diff --git a/regression/tests/test-tcp-nsc-lfn.py b/regression/tests/test-tcp-nsc-lfn.py index b58d4b227..aaa6436b4 100644 --- a/regression/tests/test-tcp-nsc-lfn.py +++ b/regression/tests/test-tcp-nsc-lfn.py @@ -5,10 +5,12 @@ import platform -def may_run(env): +def may_run(env, options): if not env['NSC_ENABLED']: return "NSC not available" else: + if options.valgrind: + return "NSC does not get along with valgrind" return 0