[Lldb-commits] [lldb] bc0b569 - [LLDB] Fix tab size settings tests

walter erquinigo via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 28 14:55:20 PDT 2023


Author: walter erquinigo
Date: 2023-08-28T17:55:15-04:00
New Revision: bc0b5699063ef4a678e663b8aee738b4906f8719

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

LOG: [LLDB] Fix tab size settings tests

They were reported in https://lab.llvm.org/buildbot/#/builders/68/builds/58956 and the fix is simple.

Added: 
    

Modified: 
    lldb/test/API/commands/settings/TestSettings.py
    lldb/test/Shell/Settings/TestSettingsSet.test

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/commands/settings/TestSettings.py b/lldb/test/API/commands/settings/TestSettings.py
index 33b0e6fdeb461c..a2d845493d1df9 100644
--- a/lldb/test/API/commands/settings/TestSettings.py
+++ b/lldb/test/API/commands/settings/TestSettings.py
@@ -6,10 +6,11 @@
 import json
 import os
 import re
+
 import lldb
+from lldbsuite.test import lldbutil
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
 
 
 class SettingsCommandTestCase(TestBase):
@@ -777,7 +778,7 @@ def test_settings_clear_all(self):
         # Change a single boolean value.
         self.runCmd("settings set auto-confirm true")
         # Change a single integer value.
-        self.runCmd("settings set tab-size 2")
+        self.runCmd("settings set tab-size 4")
 
         # Clear everything.
         self.runCmd("settings clear --all")
@@ -792,7 +793,7 @@ def test_settings_clear_all(self):
             patterns=["^target.run-args \(arguments\) =\s*$"],
         )
         self.expect("settings show auto-confirm", substrs=["false"])
-        self.expect("settings show tab-size", substrs=["4"])
+        self.expect("settings show tab-size", substrs=["2"])
 
         # Check that the command fails if we combine '--all' option with any arguments.
         self.expect(
@@ -931,13 +932,13 @@ def test_settings_api(self):
 
         # Test basic values and embedding special JSON escaping characters.
         self.runCmd("settings set auto-confirm true")
-        self.runCmd("settings set tab-size 2")
+        self.runCmd("settings set tab-size 4")
         arg_value = 'hello "world"'
         self.runCmd("settings set target.arg0 %s" % arg_value)
 
         settings_json = self.get_setting_json()
         self.assertEqual(settings_json["auto-confirm"], True)
-        self.assertEqual(settings_json["tab-size"], 2)
+        self.assertEqual(settings_json["tab-size"], 4)
         self.assertEqual(settings_json["target"]["arg0"], arg_value)
 
         settings_data = self.get_setting_json("target.arg0")

diff  --git a/lldb/test/Shell/Settings/TestSettingsSet.test b/lldb/test/Shell/Settings/TestSettingsSet.test
index 8e90c00c77c2a2..59c0fa1a55d1a5 100644
--- a/lldb/test/Shell/Settings/TestSettingsSet.test
+++ b/lldb/test/Shell/Settings/TestSettingsSet.test
@@ -14,7 +14,7 @@ settings show tab-size
 
 settings set -f tab-size
 settings show tab-size
-# CHECK: tab-size (unsigned) = 4
+# CHECK: tab-size (unsigned) = 2
 
 settings set tab-size
 # CHECK: error: 'settings set' takes more arguments


        


More information about the lldb-commits mailing list