================ @@ -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) ---------------- slydiman wrote:
I expected the following usage: 1: Use filename ``` target_path = lldbutil.install_to_target(self, "a.out") ``` 2: Use path ``` local_path = self.getBuildArtifact("some_file") # write to local_path here ... # avoid typing "some_file" constant twice, just extract the filename from the local_path target_path = lldbutil.install_to_target(self, path=local_path) ``` 3: Use both ``` # "temp" is the filename on the remote target target_path = lldbutil.install_to_target(self, "temp", local_temp_path_outside_build_dir) ``` https://github.com/llvm/llvm-project/pull/91944 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits