diff options
Diffstat (limited to 'lldb/test/lldbtest.py')
| -rw-r--r-- | lldb/test/lldbtest.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py index ba1b1d9fb32..679eafed33e 100644 --- a/lldb/test/lldbtest.py +++ b/lldb/test/lldbtest.py @@ -618,6 +618,22 @@ def skipIfLinux(func): func(*args, **kwargs) return wrapper +def skipIfDarwin(func): + """Decorate the item to skip tests that should be skipped on Darwin.""" + if isinstance(func, type) and issubclass(func, unittest2.TestCase): + raise Exception("@skipIfLinux can only be used to decorate a test method") + @wraps(func) + def wrapper(*args, **kwargs): + from unittest2 import case + self = args[0] + platform = sys.platform + if "darwin" in platform: + self.skipTest("skip on darwin") + else: + func(*args, **kwargs) + return wrapper + + def skipIfLinuxClang(func): """Decorate the item to skip tests that should be skipped if building on Linux with clang. |

