return unittest2.skipUnless(lldbplatformutil.getPlatform() in oslist,
"requires on of %s" % (", ".join(oslist)))
-
-def skipIfGcc(func):
- """Decorate the item to skip tests that should be skipped if building with gcc ."""
- return skipIf(compiler="gcc")(func)
-
-def skipIfIcc(func):
- """Decorate the item to skip tests that should be skipped if building with icc ."""
- return skipIf(compiler="icc")(func)
-
def skipIfTargetAndroid(api_levels=None, archs=None):
"""Decorator to skip tests when the target is Android.
mydir = TestBase.compute_mydir(__file__)
@skipIfWindows # libc++ not ported to Windows yet
- @skipIfGcc
+ @skipIf(compiler="gcc")
@expectedFailureLinux # fails on clang 3.5 and tot
def test(self):
"""Test that that file and class static variables display correctly."""
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- @skipIfGcc
+ @skipIf(compiler="gcc")
@skipIfWindows # libc++ not ported to Windows yet
def test_with_run_command(self):
"""Test that libc++ iterators format properly."""
self.line3 = line_number('main.cpp', '// Set third break point at this line.')
self.line4 = line_number('main.cpp', '// Set fourth break point at this line.')
- @skipIfGcc
+ @skipIf(compiler="gcc")
@skipIfWindows # libc++ not ported to Windows yet
def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
mydir = TestBase.compute_mydir(__file__)
- @skipIfGcc
+ @skipIf(compiler="gcc")
@skipIfWindows # libc++ not ported to Windows yet
@add_test_categories(["pyapi"])
def test_with_run_command(self):
mydir = TestBase.compute_mydir(__file__)
- @skipIfGcc
+ @skipIf(compiler="gcc")
@skipIfWindows # libc++ not ported to Windows yet
def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
mydir = TestBase.compute_mydir(__file__)
@skipIfWindows # libc++ not ported to Windows yet
- @skipIfGcc
+ @skipIf(compiler="gcc")
def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
self.build()
mydir = TestBase.compute_mydir(__file__)
- @skipIfGcc
+ @skipIf(compiler="gcc")
@skipIfWindows # libc++ not ported to Windows yet
def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
mydir = TestBase.compute_mydir(__file__)
- @skipIfGcc
+ @skipIf(compiler="gcc")
@skipIfWindows # libc++ not ported to Windows yet
def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- @skipIfGcc
+ @skipIf(compiler="gcc")
@skipIfWindows # libc++ not ported to Windows yet
def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
mydir = TestBase.compute_mydir(__file__)
@skipIfWindows # libc++ not ported to Windows yet
- @skipIfGcc
+ @skipIf(compiler="gcc")
def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
self.build()
# Find the line number to break at.
self.line = line_number('main.cpp', '// Set break point at this line.')
- @skipIfGcc
+ @skipIf(compiler="gcc")
@skipIfWindows # libc++ not ported to Windows.
def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
mydir = TestBase.compute_mydir(__file__)
- @skipIfGcc
+ @skipIf(compiler="gcc")
@skipIfWindows # libc++ not ported to Windows yet
def test_with_run_command(self):
"""Test that that file and class static variables display correctly."""
mydir = TestBase.compute_mydir(__file__)
- @skipIfIcc # llvm.org/pr15036: LLDB generates an incorrect AST layout for an anonymous struct when DWARF is generated by ICC
+ @skipIf(compiler="icc", bugnumber="llvm.org/pr15036: LLDB generates an incorrect AST layout for an anonymous struct when DWARF is generated by ICC")
def test_expr_nest(self):
self.build()
self.common_setup(self.line0)
self.expect("expression c->grandchild.b", VARIABLES_DISPLAYED_CORRECTLY,
substrs = ["= 2"])
- @skipIfIcc # llvm.org/pr15036: This particular regression was introduced by r181498
+ @skipIf(compiler="icc", bugnumber="llvm.org/pr15036: This particular regression was introduced by r181498")
def test_expr_grandchild(self):
self.build()
self.common_setup(self.line2)
mydir = TestBase.compute_mydir(__file__)
@expectedFailureFreeBSD("llvm.org/pr25626 test executable not built correctly on FreeBSD")
- @skipIfGcc
+ @skipIf(compiler="gcc")
def test_limit_debug_info(self):
self.build()
frame = self.get_test_frame('limit')
self.assertTrue(value_a.IsValid(), "'expr a' results in a valid SBValue object")
self.assertTrue(value_a.GetError().Success(), "'expr a' is successful")
- @skipIfGcc
+ @skipIf(compiler="gcc")
@skipIfWindows # Clang on Windows asserts in external record layout in this case.
def test_partial_limit_debug_info(self):
self.build()