diff options
author | Zachary Turner <zturner@google.com> | 2014-08-13 17:44:53 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2014-08-13 17:44:53 +0000 |
commit | c7826524acda6a9c8816261d5c48b94dc92935ed (patch) | |
tree | 86275ba20aba854402e8af66d6c4b753093a7481 /lldb/test/lldbtest.py | |
parent | d3d657ca0f2018d242345075bbe80c68922074f9 (diff) | |
download | bcm5719-llvm-c7826524acda6a9c8816261d5c48b94dc92935ed.tar.gz bcm5719-llvm-c7826524acda6a9c8816261d5c48b94dc92935ed.zip |
Get test executables compiling on Windows.
Many of the test executables use pthreads directly. This isn't
portable on Windows, so this patch converts these test to use
C++11 threads and mutexes. Since Windows' implementation of
std::thread classes throw and catch from header files, this patch
also disables exceptions when compiling with clang on Windows.
Reviewed by: Todd Fiala, Ed Maste
Differential Revision: http://reviews.llvm.org/D4816
llvm-svn: 215562
Diffstat (limited to 'lldb/test/lldbtest.py')
-rw-r--r-- | lldb/test/lldbtest.py | 15 |
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): |