Skip to content

Conversation

@da-viper
Copy link
Contributor

the skipTestIfFn requires a function that return a string to skip or None to run the test. The isUbuntu18_04 function returns a bool and the test is skipped on all platforms.

def wrapper(*args, **kwargs):
self = args[0]
if funcutils.requires_self(expected_fn):
reason = expected_fn(self)
else:
reason = expected_fn()
if reason is not None:
self.skipTest(reason)
else:
return func(*args, **kwargs)
return wrapper

the `skipTestIfFn` requires a function that return a string to skip or None to run the test. The `isUbuntu18_04` function returns a bool and the test is skipped on all platforms.
@da-viper da-viper requested a review from ashgti September 10, 2025 14:53
@llvmbot llvmbot added the lldb label Sep 10, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 10, 2025

@llvm/pr-subscribers-lldb

Author: Ebuka Ezike (da-viper)

Changes

the skipTestIfFn requires a function that return a string to skip or None to run the test. The isUbuntu18_04 function returns a bool and the test is skipped on all platforms.

def wrapper(*args, **kwargs):
self = args[0]
if funcutils.requires_self(expected_fn):
reason = expected_fn(self)
else:
reason = expected_fn()
if reason is not None:
self.skipTest(reason)
else:
return func(*args, **kwargs)
return wrapper


Full diff: https://github.com/llvm/llvm-project/pull/157872.diff

1 Files Affected:

  • (modified) lldb/test/API/functionalities/rerun_and_expr_dylib/TestRerunAndExprDylib.py (+2-2)
diff --git a/lldb/test/API/functionalities/rerun_and_expr_dylib/TestRerunAndExprDylib.py b/lldb/test/API/functionalities/rerun_and_expr_dylib/TestRerunAndExprDylib.py
index 74e7c895c0fab..a8f98ef0f0182 100644
--- a/lldb/test/API/functionalities/rerun_and_expr_dylib/TestRerunAndExprDylib.py
+++ b/lldb/test/API/functionalities/rerun_and_expr_dylib/TestRerunAndExprDylib.py
@@ -20,9 +20,9 @@ def isUbuntu18_04():
             with open(path) as f:
                 contents = f.read()
             if "Ubuntu 18.04" in contents:
-                return True
+                return "Ubuntu 18.04 is not supported."
 
-    return False
+    return None
 
 
 class TestRerunExprDylib(TestBase):

@da-viper da-viper requested a review from Michael137 September 10, 2025 14:55
@da-viper da-viper merged commit f5315bd into llvm:main Sep 10, 2025
11 checks passed
@slydiman
Copy link
Contributor

The buildbot lldb-remote-linux-ubuntu is broken after this patch. Please fix it ASAP.

@da-viper
Copy link
Contributor Author

#157916 for now investigating why it breaks on remote

da-viper added a commit to da-viper/llvm-project that referenced this pull request Sep 30, 2025
the `skipTestIfFn` requires a function that return a string to skip or
None to run the test. The `isUbuntu18_04` function returns a bool and
the test is skipped on all platforms.

https://github.com/llvm/llvm-project/blob/25ebdfe0ab202a6cb30232d84bc5838439fd67d5/lldb/packages/Python/lldbsuite/test/decorators.py#L145-L157
(cherry picked from commit f5315bd)
da-viper added a commit to swiftlang/llvm-project that referenced this pull request Sep 30, 2025
* [lldb][test] Re-enable `TestRerunAndExprDylib.py` (llvm#157872)

the `skipTestIfFn` requires a function that return a string to skip or
None to run the test. The `isUbuntu18_04` function returns a bool and
the test is skipped on all platforms.

(cherry picked from commit f5315bd)

* [lldb][test] skip test `TestRerunAndExprDylib.py` on remote (llvm#157916)

(cherry picked from commit 55e99ef)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants