Skip tests on older versions of clang

This commit is contained in:
Adrian Prantl 2021-11-16 09:09:49 -08:00
parent 6424dc21bf
commit 948b36d258
6 changed files with 12 additions and 0 deletions

View File

@ -15,6 +15,7 @@ class ExprCommandCallFunctionTestCase(TestBase):
compiler="icc",
bugnumber="llvm.org/pr14437, fails with ICC 13.1")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
@skipIf(compiler="clang", compiler_version=['<', '9.0'])
def test_with(self):
"""Test calling std::String member function."""
self.build()

View File

@ -13,6 +13,7 @@ class TestUniquePtrDbgInfoContent(TestBase):
@add_test_categories(["libc++"])
@skipIf(compiler=no_match("clang"))
@skipIf(compiler="clang", compiler_version=['<', '9.0'])
@skipIfLinux # s.reset() causes link errors on ubuntu 18.04/Clang 9
def test(self):
self.build()

View File

@ -19,6 +19,7 @@ class TestWeakSymbolsInExpressions(TestBase):
NO_DEBUG_INFO_TESTCASE = True
@decorators.skipUnlessDarwin
@skipIf(compiler="clang", compiler_version=['<', '7.0'])
def test_weak_symbol_in_expr(self):
"""Tests that we can refer to weak symbols in expressions."""
self.build()

View File

@ -42,17 +42,20 @@ class TestCase(TestBase):
lldbutil.run_to_source_breakpoint(self, "// break here", lldb.SBFileSpec(test_file))
return True
@skipIf(compiler="clang", compiler_version=['<', '9.0'])
def test_regcall(self):
if not self.build_and_run("regcall.c"):
return
self.expect_expr("func(1, 2, 3, 4)", result_type="int", result_value="10")
@skipIf(compiler="clang", compiler_version=['<', '9.0'])
@expectedFailureDarwin(archs=["arm64", "arm64e"]) # rdar://84528755
def test_ms_abi(self):
if not self.build_and_run("ms_abi.c"):
return
self.expect_expr("func(1, 2, 3, 4)", result_type="int", result_value="10")
@skipIf(compiler="clang", compiler_version=['<', '9.0'])
def test_stdcall(self):
if not self.build_and_run("stdcall.c"):
return
@ -63,11 +66,13 @@ class TestCase(TestBase):
return
self.expect_expr("func(1.0)", result_type="int", result_value="1")
@skipIf(compiler="clang", compiler_version=['<', '9.0'])
def test_fastcall(self):
if not self.build_and_run("fastcall.c"):
return
self.expect_expr("func(1, 2, 3, 4)", result_type="int", result_value="10")
@skipIf(compiler="clang", compiler_version=['<', '9.0'])
def test_pascal(self):
if not self.build_and_run("pascal.c"):
return

View File

@ -24,6 +24,7 @@ class CXXModulesImportTestCase(TestBase):
@skipUnlessDarwin
@skipIf(macos_version=["<", "10.12"])
@skipIf(compiler="clang", compiler_version=['<', '14.0'])
def test_expr(self):
self.build()
target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
@ -36,6 +37,7 @@ class CXXModulesImportTestCase(TestBase):
@skipUnlessDarwin
@skipIf(macos_version=["<", "10.12"])
@skipIf(compiler="clang", compiler_version=['<', '14.0'])
def test_expr_failing_import(self):
self.build()
shutil.rmtree(self.getBuildArtifact('include'))

View File

@ -26,6 +26,7 @@ class UniversalTestCase(TestBase):
@unittest2.skipUnless(hasattr(os, "uname") and os.uname()[4] in
['x86_64'], "requires x86_64")
@skipIfDarwinEmbedded # this test file assumes we're targetting an x86 system
@skipIf(compiler="clang", compiler_version=['<', '7.0'])
def test_sbdebugger_create_target_with_file_and_target_triple(self):
"""Test the SBDebugger.CreateTargetWithFileAndTargetTriple() API."""
# Invoke the default build rule.
@ -50,6 +51,7 @@ class UniversalTestCase(TestBase):
@unittest2.skipUnless(hasattr(os, "uname") and os.uname()[4] in
['x86_64'], "requires x86_64")
@skipIfDarwinEmbedded # this test file assumes we're targetting an x86 system
@skipIf(compiler="clang", compiler_version=['<', '7.0'])
def test_process_launch_for_universal(self):
"""Test process launch of a universal binary."""
from lldbsuite.test.lldbutil import print_registers