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.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184871 91177308-0d34-0410-b5e6-96231b3b80d8
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 @@
               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):