From 09617a5d03d367c620f0e8ff3b968ed68a1ad8f1 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Tue, 25 Jun 2013 19:11:36 +0000 Subject: [PATCH] Skip tests that hang on FreeBSD There's still significant work to do in the FreeBSD port, so no point in a pr for these yet. llvm-svn: 184871 --- .../create_after_attach/TestCreateAfterAttach.py | 5 +++++ lldb/test/lldbtest.py | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/lldb/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py b/lldb/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py index 082922c0b6cf..fc5d01c15efa 100644 --- a/lldb/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py +++ b/lldb/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py @@ -19,6 +19,9 @@ class CreateAfterAttachTestCase(TestBase): self.buildDsym(dictionary=self.getBuildFlags(use_cpp11=False)) self.create_after_attach(use_fork=False) + @skipIfFreeBSD # Hangs. May be the same as Linux issue llvm.org/pr16229 but + # not yet investigated. Revisit once required functionality + # is implemented for FreeBSD. @skipIfLinux # Hangs, see llvm.org/pr16229 @dwarf_test def test_create_after_attach_with_dwarf_and_popen(self): @@ -26,6 +29,8 @@ class CreateAfterAttachTestCase(TestBase): self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False)) self.create_after_attach(use_fork=False) + @skipIfFreeBSD # Hangs. Revisit once required functionality is implemented + # for FreeBSD. @dwarf_test def test_create_after_attach_with_dwarf_and_fork(self): """Test thread creation after process attach.""" diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py index d2feedfc06b7..ba1b1d9fb321 100644 --- a/lldb/test/lldbtest.py +++ b/lldb/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):