Skip to content

Commit b27eb0a

Browse files
committed
[lldb] Avoid modifying the source tree in TestCompletion.py
This was a side-effect of the "optimization" in #92281. Deoptimize the code slightly.
1 parent e0a293d commit b27eb0a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

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

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,17 @@ def test_process_unload(self):
108108
)
109109
err = lldb.SBError()
110110
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,
111+
if lldb.remote_platform:
112+
self.process().LoadImage(
113+
local_spec,
114+
lldb.SBFileSpec(
115+
lldbutil.append_to_process_working_directory(self, "libshared.so"),
116+
False,
117+
),
118+
err,
115119
)
116-
if lldb.remote_platform
117-
else lldb.SBFileSpec()
118-
)
119-
self.process().LoadImage(local_spec, remote_spec, err)
120+
else:
121+
self.process().LoadImage(local_spec, err)
120122
self.assertSuccess(err)
121123

122124
self.complete_from_to("process unload ", "process unload 0")

0 commit comments

Comments
 (0)