[Lldb-commits] [lldb] fa4bf3a - [lldb][NFC] Fix test settings JSON check to compare expected path list. (#132410)

via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 21 08:44:45 PDT 2025


Author: Ebuka Ezike
Date: 2025-03-21T15:44:41Z
New Revision: fa4bf3a11a42a098cae63cc81d99b262d34479fb

URL: https://github.com/llvm/llvm-project/commit/fa4bf3a11a42a098cae63cc81d99b262d34479fb
DIFF: https://github.com/llvm/llvm-project/commit/fa4bf3a11a42a098cae63cc81d99b262d34479fb.diff

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

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

Signed-off-by: Ebuka Ezike <yerimyah1 at gmail.com>

Added: 
    

Modified: 
    lldb/test/API/commands/settings/TestSettings.py

Removed: 
    


################################################################################
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}\\


        


More information about the lldb-commits mailing list