Skip C++ API/Multithreaded tests that are unsupported with Clang/libstdc++

- older versions of clang are unable to include <chrono> from libstdc++
- skipping tests until buildbots are updated

llvm-svn: 181829
This commit is contained in:
Daniel Malea 2013-05-14 20:48:54 +00:00
parent 571f1af0bb
commit 4835990a6f
2 changed files with 22 additions and 0 deletions

View File

@ -20,12 +20,14 @@ class SBBreakpointCallbackCase(TestBase):
@unittest2.expectedFailure # llvm.org/pr-1600: SBBreakpoint.SetCallback() does nothing
@skipIfi386
@skipIfLinuxClang # buildbot clang version unable to use libstdc++ with c++11
def test_breakpoint_callback(self):
"""Test the that SBBreakpoint callback is invoked when a breakpoint is hit. """
self.build_and_test('driver.cpp test_breakpoint_callback.cpp',
'test_breakpoint_callback')
@skipIfi386
@skipIfLinuxClang # buildbot clang version unable to use libstdc++ with c++11
def test_sb_api_listener_event_description(self):
""" Test the description of an SBListener breakpoint event is valid."""
self.build_and_test('driver.cpp listener_test.cpp test_listener_event_description.cpp',
@ -33,6 +35,7 @@ class SBBreakpointCallbackCase(TestBase):
pass
@skipIfi386
@skipIfLinuxClang # buildbot clang version unable to use libstdc++ with c++11
def test_sb_api_listener_event_process_state(self):
""" Test that a registered SBListener receives events when a process
changes state.
@ -43,6 +46,7 @@ class SBBreakpointCallbackCase(TestBase):
@skipIfi386
@skipIfLinuxClang # buildbot clang version unable to use libstdc++ with c++11
def test_sb_api_listener_resume(self):
""" Test that a process can be resumed from a non-main thread. """
self.build_and_test('driver.cpp listener_test.cpp test_listener_resume.cpp',

View File

@ -600,6 +600,24 @@ def skipOnLinux(func):
func(*args, **kwargs)
return wrapper
def skipIfLinuxClang(func):
"""Decorate the item to skip tests that should be skipped if building on
Linux with clang.
"""
if isinstance(func, type) and issubclass(func, unittest2.TestCase):
raise Exception("@skipIfLinuxClang can only be used to decorate a test method")
@wraps(func)
def wrapper(*args, **kwargs):
from unittest2 import case
self = args[0]
compiler = self.getCompiler()
platform = sys.platform
if "clang" in compiler and "linux" in platform:
self.skipTest("skipping because Clang is used on Linux")
else:
func(*args, **kwargs)
return wrapper
def skipIfGcc(func):
"""Decorate the item to skip tests that should be skipped if building with gcc ."""
if isinstance(func, type) and issubclass(func, unittest2.TestCase):