mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-03-04 16:41:43 +00:00
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
This commit is contained in:
parent
acfc01dedf
commit
09617a5d03
@ -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."""
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user