[Lldb-commits] [lldb] 698e9f5 - [lldb] Add support for NoneType to decorator skipIfBuildType (#145342)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 23 09:23:22 PDT 2025
Author: Ivan Tadeu Ferreira Antunes Filho
Date: 2025-06-23T12:23:19-04:00
New Revision: 698e9f56558e20ceb80c08c4a880bed15970b777
URL: https://github.com/llvm/llvm-project/commit/698e9f56558e20ceb80c08c4a880bed15970b777
DIFF: https://github.com/llvm/llvm-project/commit/698e9f56558e20ceb80c08c4a880bed15970b777.diff
LOG: [lldb] Add support for NoneType to decorator skipIfBuildType (#145342)
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.
Added:
Modified:
lldb/packages/Python/lldbsuite/test/decorators.py
Removed:
################################################################################
diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py
index a391319ca9b0e..a5f58373ede75 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.lower() in types,
+ configuration.cmake_build_type is not None
+ and configuration.cmake_build_type.lower() in types,
"skip on {} build type(s)".format(", ".join(types)),
)
More information about the lldb-commits
mailing list