[Lldb-commits] [lldb] [lldb][test] Support remote run of Shell tests (PR #95986)

Vladislav Dzhidzhoev via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 31 16:37:09 PDT 2024


================
@@ -22,6 +24,55 @@ def _disallow(config, execName):
     config.substitutions.append((" {0} ".format(execName), warning.format(execName)))
 
 
+def get_lldb_args(config, suffix=None):
+    lldb_args = []
+    if "remote-linux" in config.available_features:
+        lldb_args += [
+            "-O",
+            '"platform select remote-linux"',
+            "-O",
+            f'"platform connect {config.lldb_platform_url}"',
+        ]
+        if config.lldb_platform_working_dir:
+            dir = f"{config.lldb_platform_working_dir}/shell"
+            if suffix:
+                dir += f"/{suffix}"
+            lldb_args += [
+                "-O",
+                f'"platform shell mkdir -p {dir}"',
+                "-O",
+                f'"platform settings -w {dir}"',
+            ]
+    lldb_args += ["--no-lldbinit", "-S", _get_lldb_init_path(config)]
+    return lldb_args
+
+
+class ShTestLldb(ShTest):
+    def __init__(
+        self, execute_external=False, extra_substitutions=[], preamble_commands=[]
+    ):
+        super().__init__(execute_external, extra_substitutions, preamble_commands)
+
+    def execute(self, test, litConfig):
----------------
dzhidzhoev wrote:

Added comments

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


More information about the lldb-commits mailing list