Author: Pavel Labath
Date: 2024-05-17T07:33:26Z
New Revision: b27eb0ae8280675fc8fb249d39f1ccafa3ee2187

URL: 
https://github.com/llvm/llvm-project/commit/b27eb0ae8280675fc8fb249d39f1ccafa3ee2187
DIFF: 
https://github.com/llvm/llvm-project/commit/b27eb0ae8280675fc8fb249d39f1ccafa3ee2187.diff

LOG: [lldb] Avoid modifying the source tree in TestCompletion.py

This was a side-effect of the "optimization" in #92281. Deoptimize the
code slightly.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/functionalities/completion/TestCompletion.py 
b/lldb/test/API/functionalities/completion/TestCompletion.py
index 63842487fc338..15aeaf8d0e897 100644
--- a/lldb/test/API/functionalities/completion/TestCompletion.py
+++ b/lldb/test/API/functionalities/completion/TestCompletion.py
@@ -108,15 +108,17 @@ def test_process_unload(self):
         )
         err = lldb.SBError()
         local_spec = lldb.SBFileSpec(self.getBuildArtifact("libshared.so"))
-        remote_spec = (
-            lldb.SBFileSpec(
-                lldbutil.append_to_process_working_directory(self, 
"libshared.so"),
-                False,
+        if lldb.remote_platform:
+            self.process().LoadImage(
+                local_spec,
+                lldb.SBFileSpec(
+                    lldbutil.append_to_process_working_directory(self, 
"libshared.so"),
+                    False,
+                ),
+                err,
             )
-            if lldb.remote_platform
-            else lldb.SBFileSpec()
-        )
-        self.process().LoadImage(local_spec, remote_spec, err)
+        else:
+            self.process().LoadImage(local_spec, err)
         self.assertSuccess(err)
 
         self.complete_from_to("process unload ", "process unload 0")


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to