[lldb] Skip tests incompatible with older versions of Clang
authorFelipe de Azevedo Piovezan <fpiovezan@apple.com>
Mon, 26 Sep 2022 14:16:53 +0000 (10:16 -0400)
committerFelipe de Azevedo Piovezan <fpiovezan@apple.com>
Mon, 26 Sep 2022 17:27:51 +0000 (13:27 -0400)
The coroutine tests require a standard library implementation of
coroutines, which was only made available some time _after_ Clang 13.
The first such Clang tested by the LLDB matrix bot is 15.0.1

The TestObjCExceptions test forces the use of the system's libcxx. For
the lldb matrix bot, the first Clang version compatible with the bot's
libraries is 13.0.

Differential Revision: https://reviews.llvm.org/D134645

lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/coroutine_handle/TestCoroutineHandle.py
lldb/test/API/lang/objc/exceptions/TestObjCExceptions.py

index 8288fcf..224a550 100644 (file)
@@ -79,5 +79,6 @@ class TestCoroutineHandle(TestBase):
         self.do_test(USE_LIBSTDCPP)
 
     @add_test_categories(["libc++"])
+    @skipIf(compiler="clang", compiler_version=['<', '15.0'])
     def test_libcpp(self):
         self.do_test(USE_LIBCPP)
index 663ab11..23d9466 100644 (file)
@@ -13,6 +13,7 @@ from lldbsuite.test import lldbutil
 
 class ObjCExceptionsTestCase(TestBase):
 
+    @skipIf(compiler="clang", compiler_version=['<', '13.0'])
     def test_objc_exceptions_at_throw(self):
         self.build()
 
@@ -123,6 +124,7 @@ class ObjCExceptionsTestCase(TestBase):
         for n in ["objc_exception_throw", "foo(int)", "main"]:
             self.assertIn(n, names, "%s is in the exception backtrace (%s)" % (n, names))
 
+    @skipIf(compiler="clang", compiler_version=['<', '13.0'])
     def test_objc_exceptions_at_abort(self):
         self.build()
 
@@ -179,6 +181,7 @@ class ObjCExceptionsTestCase(TestBase):
         for n in ["objc_exception_throw", "foo(int)", "rethrow(int)", "main"]:
             self.assertEqual(len([f for f in history_thread.frames if f.GetFunctionName() == n]), 1)
 
+    @skipIf(compiler="clang", compiler_version=['<', '13.0'])
     def test_cxx_exceptions_at_abort(self):
         self.build()