Skip to content

[lldb][NFC] Fix test settings JSON check to compare expected path list. #132410

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 1 commit into from
Mar 21, 2025

Conversation

da-viper
Copy link
Contributor

Previously, the test compared the JSON output to setting_value which was incorrect. Updated the assertion to validate against the correct list of paths [path1, path2] to ensure accurate test behavior.

Ran the test on the local computer

Previously, the test compared the JSON output to `setting_value` which was incorrect. Updated the assertion to validate against the correct list of paths `[path1, path2]` to ensure accurate test behavior.

Signed-off-by: Ebuka Ezike <[email protected]>
@da-viper da-viper requested a review from JDevlieghere as a code owner March 21, 2025 15:14
@llvmbot llvmbot added the lldb label Mar 21, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 21, 2025

@llvm/pr-subscribers-lldb

Author: Ebuka Ezike (da-viper)

Changes

Previously, the test compared the JSON output to setting_value which was incorrect. Updated the assertion to validate against the correct list of paths [path1, path2] to ensure accurate test behavior.

Ran the test on the local computer


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

1 Files Affected:

  • (modified) lldb/test/API/commands/settings/TestSettings.py (+1-1)
diff --git a/lldb/test/API/commands/settings/TestSettings.py b/lldb/test/API/commands/settings/TestSettings.py
index 2a7c852fc916d..b9b66ea953971 100644
--- a/lldb/test/API/commands/settings/TestSettings.py
+++ b/lldb/test/API/commands/settings/TestSettings.py
@@ -1022,7 +1022,7 @@ def test_settings_api(self):
         path2 = os.path.join(self.getSourceDir(), "tmp2")
         self.runCmd("settings set %s '%s' '%s'" % (setting_path, path1, path2))
         settings_json = self.get_setting_json(setting_path)
-        self.assertEqual(settings_json, setting_value)
+        self.assertEqual(settings_json, [path1, path2])
 
         # Test OptionValueFormatEntity
         setting_value = """thread #${thread.index}{, name = \\'${thread.name}\\

@da-viper da-viper merged commit fa4bf3a into llvm:main Mar 21, 2025
9 of 11 checks passed
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.

2 participants