[lldb][test] Skip TestRerunAndExprDylib on Ubuntu 18.04
authorDave Lee <davelee.com@gmail.com>
Thu, 19 Jan 2023 18:38:21 +0000 (10:38 -0800)
committerDave Lee <davelee.com@gmail.com>
Fri, 20 Jan 2023 15:54:32 +0000 (07:54 -0800)
Disable this test on Ubuntu 18.04, where it fails for yet to be determined reasons.

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

lldb/test/API/functionalities/rerun_and_expr_dylib/TestRerunAndExprDylib.py

index fb4cc32..1a6944e 100644 (file)
@@ -9,7 +9,24 @@ from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 from lldbsuite.test.decorators import *
 
+
+def isUbuntu18_04():
+    """
+    Check if the host OS is Ubuntu 18.04.
+    Derived from `platform.freedesktop_os_release` in Python 3.10.
+    """
+    for path in ("/etc/os-release", "/usr/lib/os-release"):
+        if os.path.exists(path):
+            with open(path) as f:
+                contents = f.read()
+            if "Ubuntu 18.04" in contents:
+                return True
+
+    return False
+
+
 class TestRerunExprDylib(TestBase):
+    @skipTestIfFn(isUbuntu18_04, bugnumber="rdar://103831050")
     @skipIfWindows
     def test(self):
         """