summaryrefslogtreecommitdiffstats
path: root/lldb/test/lldbtest.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/lldbtest.py')
-rw-r--r--lldb/test/lldbtest.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py
index 2e35fd28738..7c8c84d6ea9 100644
--- a/lldb/test/lldbtest.py
+++ b/lldb/test/lldbtest.py
@@ -554,6 +554,21 @@ def skipIfLinux(func):
func(*args, **kwargs)
return wrapper
+def skipIfWindows(func):
+ """Decorate the item to skip tests that should be skipped on Windows."""
+ if isinstance(func, type) and issubclass(func, unittest2.TestCase):
+ raise Exception("@skipIfWindows 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 "win32" in platform:
+ self.skipTest("skip on Windows")
+ else:
+ 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):
OpenPOWER on IntegriCloud