[Lldb-commits] [lldb] [lldb] Add lldbutil.target_install() helper (PR #91944)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon May 13 07:34:49 PDT 2024


================
@@ -1654,6 +1654,26 @@ def find_library_callable(test):
     )
 
 
+def target_install(test, filename=None, path=None):
+    test.assertTrue(filename or path, "filename or path must be specified.")
+    if filename is None:
+        filename = os.path.basename(path)
+    if path is None:
+        path = test.getBuildArtifact(filename)
----------------
labath wrote:

This seems a bit... magical. Can we just have the caller specify a full path to the thing it wants to install? `self.getBuildArtifact` is not that much extra typing.

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


More information about the lldb-commits mailing list