-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[lldb] Fix plugin test to not rely on enabled targets #148956
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
Conversation
The plugins completion test was checking completions for the abi plugins. But the available abi plugins will depend on which [targets](https://github.com/llvm/llvm-project/blob/42d2ae1034b287eb60563c370dbf52c59b66db20/lldb/source/Plugins/ABI/CMakeLists.txt#L7) are enabled in the cmake build configuration. This PR updates the test to check for the json object file instead which should be enabled on all builds.
|
This is to fix a buildbot failure: https://lab.llvm.org/buildbot/#/builders/195/builds/11884 |
|
@llvm/pr-subscribers-lldb Author: David Peixotto (dmpots) ChangesThe plugins completion test was checking completions for the abi plugins. But the available abi plugins will depend on which targets are enabled in the cmake build configuration. This PR updates the test to check for the json object file instead which should be enabled on all builds. Full diff: https://github.com/llvm/llvm-project/pull/148956.diff 1 Files Affected:
diff --git a/lldb/test/API/commands/plugin/TestPlugin.py b/lldb/test/API/commands/plugin/TestPlugin.py
index e7de7a3f797f1..bd8ab9604538e 100644
--- a/lldb/test/API/commands/plugin/TestPlugin.py
+++ b/lldb/test/API/commands/plugin/TestPlugin.py
@@ -82,10 +82,10 @@ def test_completions(self):
)
# A completion for a full namespace should contain the plugins in that namespace.
- self.completions_contain("plugin list abi", ["abi.sysv-x86_64"])
- self.completions_contain("plugin list abi.", ["abi.sysv-x86_64"])
- self.completions_contain("plugin list abi.s", ["abi.sysv-x86_64"])
- self.completions_contain("plugin list abi.sysv-x", ["abi.sysv-x86_64"])
+ self.completions_contain("plugin list object-file", ["object-file.JSON"])
+ self.completions_contain("plugin list object-file.", ["object-file.JSON"])
+ self.completions_contain("plugin list object-file.J", ["object-file.JSON"])
+ self.completions_contain("plugin list object-file.JS", ["object-file.JSON"])
# Check for a completion that is a both a complete namespace and a prefix of
# another namespace. It should return the completions for the plugins in the completed
|
Jlalond
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if object file json will always be present, otherwise gating this test makes sense IMO.
| self.completions_contain("plugin list abi.", ["abi.sysv-x86_64"]) | ||
| self.completions_contain("plugin list abi.s", ["abi.sysv-x86_64"]) | ||
| self.completions_contain("plugin list abi.sysv-x", ["abi.sysv-x86_64"]) | ||
| self.completions_contain("plugin list object-file", ["object-file.JSON"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The object file Json plugin will always be there?
Can we gate the test in such a way to ensure that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see anything in the CMakeLists.txt file that conditionally enables the JSON object file plugin (unlike the ABI plugins). I also do not see any gates in the json object file tests:
llvm-project/lldb/test/API/functionalities/json/object-file/TestObjectFileJSON.py
Line 13 in bc187b8
| class TestObjectFileJSON(TestBase): |
So I think it should always be there.
The plugins completion test was checking completions for the abi plugins. But the available abi plugins will depend on which targets are enabled in the cmake build configuration.
This PR updates the test to check for the json object file instead which should be enabled on all builds.