Skip to content

[lldb] Add support for NoneType to decorator skipIfBuildType #145342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 23, 2025

Conversation

itf
Copy link
Contributor

@itf itf commented Jun 23, 2025

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.

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.
@itf itf requested a review from JDevlieghere as a code owner June 23, 2025 15:31
@llvmbot llvmbot added the lldb label Jun 23, 2025
@llvmbot
Copy link
Member

llvmbot commented Jun 23, 2025

@llvm/pr-subscribers-lldb

Author: Ivan Tadeu Ferreira Antunes Filho (itf)

Changes

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 --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)),
     )

Copy link

github-actions bot commented Jun 23, 2025

✅ With the latest revision this PR passed the Python code formatter.

@JDevlieghere JDevlieghere requested a review from ashgti June 23, 2025 15:44
@itf itf merged commit 698e9f5 into llvm:main Jun 23, 2025
7 checks passed
miguelcsx pushed a commit to miguelcsx/llvm-project that referenced this pull request Jun 23, 2025
…5342)

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.
Jaddyen pushed a commit to Jaddyen/llvm-project that referenced this pull request Jun 23, 2025
…5342)

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.
anthonyhatran pushed a commit to anthonyhatran/llvm-project that referenced this pull request Jun 26, 2025
…5342)

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.
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.

5 participants