From 948b36d2582c9cde913e434bd22814f01e85bdd6 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Tue, 16 Nov 2021 09:09:49 -0800 Subject: [PATCH] Skip tests on older versions of clang --- .../expression/call-function/TestCallStdStringFunction.py | 1 + .../TestUniquePtrDbgInfoContent.py | 1 + .../API/commands/expression/weak_symbols/TestWeakSymbols.py | 1 + .../lang/c/calling-conventions/TestCCallingConventions.py | 5 +++++ .../test/API/lang/cpp/modules-import/TestCXXModulesImport.py | 2 ++ lldb/test/API/macosx/universal/TestUniversal.py | 2 ++ 6 files changed, 12 insertions(+) diff --git a/lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py b/lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py index f94bcae34cf9..b3a61191480b 100644 --- a/lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py +++ b/lldb/test/API/commands/expression/call-function/TestCallStdStringFunction.py @@ -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() diff --git a/lldb/test/API/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py b/lldb/test/API/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py index abc9c1931489..5fba71d023fe 100644 --- a/lldb/test/API/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py +++ b/lldb/test/API/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py @@ -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() diff --git a/lldb/test/API/commands/expression/weak_symbols/TestWeakSymbols.py b/lldb/test/API/commands/expression/weak_symbols/TestWeakSymbols.py index 127461d7f746..bd7173df5cca 100644 --- a/lldb/test/API/commands/expression/weak_symbols/TestWeakSymbols.py +++ b/lldb/test/API/commands/expression/weak_symbols/TestWeakSymbols.py @@ -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() diff --git a/lldb/test/API/lang/c/calling-conventions/TestCCallingConventions.py b/lldb/test/API/lang/c/calling-conventions/TestCCallingConventions.py index 9a5acd5a1887..6fd60c22cea4 100644 --- a/lldb/test/API/lang/c/calling-conventions/TestCCallingConventions.py +++ b/lldb/test/API/lang/c/calling-conventions/TestCCallingConventions.py @@ -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 diff --git a/lldb/test/API/lang/cpp/modules-import/TestCXXModulesImport.py b/lldb/test/API/lang/cpp/modules-import/TestCXXModulesImport.py index e7f98c63b5e6..58a5fa2aeea3 100644 --- a/lldb/test/API/lang/cpp/modules-import/TestCXXModulesImport.py +++ b/lldb/test/API/lang/cpp/modules-import/TestCXXModulesImport.py @@ -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')) diff --git a/lldb/test/API/macosx/universal/TestUniversal.py b/lldb/test/API/macosx/universal/TestUniversal.py index e3ae675e1602..94e6ac97c4f6 100644 --- a/lldb/test/API/macosx/universal/TestUniversal.py +++ b/lldb/test/API/macosx/universal/TestUniversal.py @@ -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