Skip the NSC test when valgrind is enabled.
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Wed, 28 Jan 2009 11:06:50 +0000
changeset 4130 9bddd87225a9
parent 4129 9b1f5d58dfb6
child 4131 71260995880e
Skip the NSC test when valgrind is enabled.
regression.py
regression/tests/test-csma-bridge.py
regression/tests/test-tcp-nsc-lfn.py
--- a/regression.py	Wed Jan 28 11:01:02 2009 +0000
+++ b/regression.py	Wed Jan 28 11:06:50 2009 +0000
@@ -84,7 +84,7 @@
             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:
--- a/regression/tests/test-csma-bridge.py	Wed Jan 28 11:01:02 2009 +0000
+++ b/regression/tests/test-csma-bridge.py	Wed Jan 28 11:06:50 2009 +0000
@@ -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
--- a/regression/tests/test-tcp-nsc-lfn.py	Wed Jan 28 11:01:02 2009 +0000
+++ b/regression/tests/test-tcp-nsc-lfn.py	Wed Jan 28 11:06:50 2009 +0000
@@ -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