[Lldb-commits] [lldb] [lldb] More windows fixes TestSettings.py (PR #154983)
Dave Lee via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 22 09:51:12 PDT 2025
https://github.com/kastiglione created https://github.com/llvm/llvm-project/pull/154983
None
>From 06b3b8336271662500a9997b082f2201eb0715da Mon Sep 17 00:00:00 2001
From: Dave Lee <davelee.com at gmail.com>
Date: Fri, 22 Aug 2025 09:50:46 -0700
Subject: [PATCH] [lldb] More windows fixes TestSettings.py
---
lldb/test/API/commands/settings/TestSettings.py | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/lldb/test/API/commands/settings/TestSettings.py b/lldb/test/API/commands/settings/TestSettings.py
index 4f46825fa7aa7..95b07f8326f2c 100644
--- a/lldb/test/API/commands/settings/TestSettings.py
+++ b/lldb/test/API/commands/settings/TestSettings.py
@@ -1062,16 +1062,17 @@ def test_settings_show_defaults(self):
"settings show --defaults target.env-vars",
substrs=["(default: empty)", "THING=value"],
)
+ pwd = os.getcwd()
# file list
self.expect(
"settings show --defaults target.exec-search-paths",
matching=False,
substrs=["(default: empty)"],
)
- self.runCmd("settings set target.exec-search-paths /tmp")
+ self.runCmd(f"settings set target.exec-search-paths {pwd}")
self.expect(
"settings show --defaults target.exec-search-paths",
- patterns=[r"\(default: empty\)", r"\[0\]: [/\\]tmp"],
+ substrs=["(default: empty)", f"[0]: {pwd}"],
)
# path map
self.expect(
@@ -1079,10 +1080,13 @@ def test_settings_show_defaults(self):
matching=False,
substrs=["(default: empty)"],
)
- self.runCmd("settings set target.source-map /abc /tmp")
+ self.runCmd(f"settings set target.source-map /abc {pwd}")
self.expect(
"settings show --defaults target.source-map",
- patterns=[r"\(default: empty\)", r'\[0\] "[/\\]abc" -> "[/\\]tmp"'],
+ patterns=[
+ r"\(default: empty\)",
+ rf'\[0\] "[/\\]abc" -> "{re.escape(pwd)}"',
+ ],
)
def get_setting_json(self, setting_path=None):
More information about the lldb-commits
mailing list