[Lldb-commits] [PATCH] Skip tests that hang on FreeBSD
Ed Maste
emaste at freebsd.org
Tue Jun 25 07:15:14 PDT 2013
There's still significant work to do in the FreeBSD port, so no point
in a pr for these yet.
---
.../thread/create_after_attach/TestCreateAfterAttach.py | 2 ++
test/lldbtest.py | 15 +++++++++++++++
2 files changed, 17 insertions(+)
diff --git a/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py b/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
index 082922c..2e2f66d 100644
--- a/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
+++ b/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
@@ -19,6 +19,7 @@ class CreateAfterAttachTestCase(TestBase):
self.buildDsym(dictionary=self.getBuildFlags(use_cpp11=False))
self.create_after_attach(use_fork=False)
+ @skipIfFreeBSD # Hangs
@skipIfLinux # Hangs, see llvm.org/pr16229
@dwarf_test
def test_create_after_attach_with_dwarf_and_popen(self):
@@ -26,6 +27,7 @@ class CreateAfterAttachTestCase(TestBase):
self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False))
self.create_after_attach(use_fork=False)
+ @skipIfFreeBSD # Hangs
@dwarf_test
def test_create_after_attach_with_dwarf_and_fork(self):
"""Test thread creation after process attach."""
diff --git a/test/lldbtest.py b/test/lldbtest.py
index d2feedf..ba1b1d9 100644
--- a/test/lldbtest.py
+++ b/test/lldbtest.py
@@ -588,6 +588,21 @@ def expectedFailureDarwin(bugnumber=None):
return wrapper
return expectedFailureDarwin_impl
+def skipIfFreeBSD(func):
+ """Decorate the item to skip tests that should be skipped on FreeBSD."""
+ if isinstance(func, type) and issubclass(func, unittest2.TestCase):
+ raise Exception("@skipIfFreeBSD 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 "freebsd" in platform:
+ self.skipTest("skip on FreeBSD")
+ else:
+ func(*args, **kwargs)
+ return wrapper
+
def skipIfLinux(func):
"""Decorate the item to skip tests that should be skipped on Linux."""
if isinstance(func, type) and issubclass(func, unittest2.TestCase):
--
1.7.11.5
More information about the lldb-commits
mailing list