Skip to content

Commit eb822dc

Browse files
authored
[lldb] Fixed the TestCompletion test running on a remote target (#92281)
Install the image to the remote target if necessary.
1 parent 4525f44 commit eb822dc

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

lldb/test/API/functionalities/completion/TestCompletion.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,16 @@ def test_process_unload(self):
107107
self, "// Break here", lldb.SBFileSpec("main.cpp")
108108
)
109109
err = lldb.SBError()
110-
self.process().LoadImage(
111-
lldb.SBFileSpec(self.getBuildArtifact("libshared.so")), err
110+
local_spec = lldb.SBFileSpec(self.getBuildArtifact("libshared.so"))
111+
remote_spec = (
112+
lldb.SBFileSpec(
113+
lldbutil.append_to_process_working_directory(self, "libshared.so"),
114+
False,
115+
)
116+
if lldb.remote_platform
117+
else lldb.SBFileSpec()
112118
)
119+
self.process().LoadImage(local_spec, remote_spec, err)
113120
self.assertSuccess(err)
114121

115122
self.complete_from_to("process unload ", "process unload 0")
@@ -473,7 +480,7 @@ def test_custom_command_completion(self):
473480
self.complete_from_to("my_test_cmd main.cp", ["main.cpp"])
474481
self.expect("my_test_cmd main.cpp", substrs=["main.cpp"])
475482

476-
@skipIfWindows
483+
@skipIf(hostoslist=["windows"])
477484
def test_completion_target_create_from_root_dir(self):
478485
"""Tests source file completion by completing ."""
479486
root_dir = os.path.abspath(os.sep)

0 commit comments

Comments
 (0)