llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Dmitry Vasilyev (slydiman)

<details>
<summary>Changes</summary>

It is necessary to select the expected platform at the beginning. In case of 
`Windows` host platform1.GetName() returned `host`. platform2.GetName() 
returned `remote-linux`, but platform2.GetWorkingDirectory() was None and 
finally
```
  File "llvm-project\lldb\test\API\python_api\debugger\TestDebuggerAPI.py", 
line 108, in test_CreateTarget_platform
    platform2.GetWorkingDirectory().endswith("bar"),
AttributeError: 'NoneType' object has no attribute 'endswith'
```

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


1 Files Affected:

- (modified) lldb/test/API/python_api/debugger/TestDebuggerAPI.py (+1) 


``````````diff
diff --git a/lldb/test/API/python_api/debugger/TestDebuggerAPI.py 
b/lldb/test/API/python_api/debugger/TestDebuggerAPI.py
index 522de2466012ed..3d6484e5c9fbc4 100644
--- a/lldb/test/API/python_api/debugger/TestDebuggerAPI.py
+++ b/lldb/test/API/python_api/debugger/TestDebuggerAPI.py
@@ -95,6 +95,7 @@ def test_CreateTarget_platform(self):
         exe = self.getBuildArtifact("a.out")
         self.yaml2obj("elf.yaml", exe)
         error = lldb.SBError()
+        self.dbg.SetSelectedPlatform(lldb.SBPlatform("remote-linux"))
         target1 = self.dbg.CreateTarget(exe, None, "remote-linux", False, 
error)
         self.assertSuccess(error)
         platform1 = target1.GetPlatform()

``````````

</details>


https://github.com/llvm/llvm-project/pull/90580
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to