From a6e7bcb0159a62c68cc3e67ba7ad75068d371aad Mon Sep 17 00:00:00 2001 From: Mark Wiebe Date: Fri, 31 Aug 2012 10:53:37 -0700 Subject: [PATCH] Skip tests using pthreads on Windows Note: They were causing hard exits of Python, not exceptions, this is something that will have to be fixed in the future --- test_atomic_add.py | 2 ++ test_atomic_cmpxchg.py | 2 ++ test_pthread.py | 2 ++ 3 files changed, 6 insertions(+) diff --git a/test_atomic_add.py b/test_atomic_add.py index 27688e7..70faa0c 100644 --- a/test_atomic_add.py +++ b/test_atomic_add.py @@ -8,6 +8,7 @@ from llvm.ee import * from llvm_cbuilder import * import llvm_cbuilder.shortnames as C import unittest, logging +import sys # logging.basicConfig(level=logging.DEBUG) @@ -66,6 +67,7 @@ def gen_test_pthread(mod): return cb.function class TestAtomicAdd(unittest.TestCase): + @unittest.skipIf(sys.platform == 'win32', "test uses pthreads, not supported on Windows") def test_atomic_add(self): mod = Module.new(__name__) # add pthread functions diff --git a/test_atomic_cmpxchg.py b/test_atomic_cmpxchg.py index 27fb763..9058e42 100644 --- a/test_atomic_cmpxchg.py +++ b/test_atomic_cmpxchg.py @@ -8,6 +8,7 @@ from llvm.ee import * from llvm_cbuilder import * import llvm_cbuilder.shortnames as C import unittest, logging +import sys # logging.basicConfig(level=logging.DEBUG) @@ -71,6 +72,7 @@ def gen_test_pthread(mod): return cb.function class TestAtomicCmpXchg(unittest.TestCase): + @unittest.skipIf(sys.platform == 'win32', "test uses pthreads, not supported on Windows") def test_atomic_cmpxchg(self): mod = Module.new(__name__) # add pthread functions diff --git a/test_pthread.py b/test_pthread.py index d1d3a72..23a2083 100644 --- a/test_pthread.py +++ b/test_pthread.py @@ -4,6 +4,7 @@ from llvm.ee import * from llvm_cbuilder import * import llvm_cbuilder.shortnames as C import unittest, logging +import sys # logging.basicConfig(level=logging.DEBUG) @@ -50,6 +51,7 @@ def gen_test_pthread(mod): return cb.function class TestPThread(unittest.TestCase): + @unittest.skipIf(sys.platform == 'win32', "pthreads not supported on Windows") def test_pthread(self): mod = Module.new(__name__) # add pthread functions