[Lldb-commits] [lldb] [lldb] Fixed the test TestQuoting (PR #91886)

via lldb-commits lldb-commits at lists.llvm.org
Sun May 12 07:10:38 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Dmitry Vasilyev (slydiman)

<details>
<summary>Changes</summary>

os.path.join() uses the path separator of the host OS by default. outfile_arg will be incorrect in case of Windows host and Linux target. Use lldbutil.append_to_process_working_directory() instead.

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


1 Files Affected:

- (modified) lldb/test/API/commands/settings/quoting/TestQuoting.py (+2-2) 


``````````diff
diff --git a/lldb/test/API/commands/settings/quoting/TestQuoting.py b/lldb/test/API/commands/settings/quoting/TestQuoting.py
index 393f4be3c8242..d6246a5309c5d 100644
--- a/lldb/test/API/commands/settings/quoting/TestQuoting.py
+++ b/lldb/test/API/commands/settings/quoting/TestQuoting.py
@@ -51,8 +51,8 @@ def expect_args(self, args_in, args_out):
         outfile = self.getBuildArtifact(filename)
 
         if lldb.remote_platform:
-            outfile_arg = os.path.join(
-                lldb.remote_platform.GetWorkingDirectory(), filename
+            outfile_arg = lldbutil.append_to_process_working_directory(
+                self, filename
             )
         else:
             outfile_arg = outfile

``````````

</details>


https://github.com/llvm/llvm-project/pull/91886


More information about the lldb-commits mailing list