[Lldb-commits] [lldb] [lldb] Add support for NoneType to decorator skipIfBuildType (PR #145342)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 23 08:32:44 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Ivan Tadeu Ferreira Antunes Filho (itf)
<details>
<summary>Changes</summary>
Currently if cmake_build_type is None we error with `AttributeError: 'NoneType' object has no attribute 'lower'` if the decorator skipIfBuildType is used. This fixes the issue by first checking that cmake_build_type is not None.
---
Full diff: https://github.com/llvm/llvm-project/pull/145342.diff
1 Files Affected:
- (modified) lldb/packages/Python/lldbsuite/test/decorators.py (+1)
``````````diff
diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py
index a391319ca9b0e..d74979891f548 100644
--- a/lldb/packages/Python/lldbsuite/test/decorators.py
+++ b/lldb/packages/Python/lldbsuite/test/decorators.py
@@ -1155,6 +1155,7 @@ def skipIfBuildType(types: list[str]):
"""
types = [name.lower() for name in types]
return unittest.skipIf(
+ configuration.cmake_build_type != None &&
configuration.cmake_build_type.lower() in types,
"skip on {} build type(s)".format(", ".join(types)),
)
``````````
</details>
https://github.com/llvm/llvm-project/pull/145342
More information about the lldb-commits
mailing list