[PATCH] Add remote testing support to the lit config.

Jonathan Roelofs jonathan at codesourcery.com
Tue Feb 3 10:41:43 PST 2015


================
Comment at: libcxx/test/config.py:124
@@ +123,3 @@
+            self.target_executor = eval(exec_str)
+            self.lit_config.note("inferred target_executor as: %r" % exec_str)
+
----------------
I forgot a

```
else:
    self.target_executor = None
```

here

================
Comment at: libcxx/test/format.py:121
@@ -112,4 +120,3 @@
                 cmd = lit_config.valgrindArgs + cmd
-            cmd += [exec_path]
-            out, err, rc = lit.util.executeCommand(
-                cmd, cwd=os.path.dirname(source_path))
+            if target_executor:
+                target_exec_path = target_executor.remote_from_local_file(exec_path)
----------------
I kept these cases separate to avoid clashing with your configuration, @danalbert. It might be better to drop the else side of this, and have target_executor be a LocalExecutor instead of None when doing local testing. I'll save that decision for later to minimize invasiveness.

================
Comment at: libcxx/test/remote.py:6
@@ +5,3 @@
+# have to deal with a lit import:
+import signal
+import platform
----------------
I couldn't figure out how to get the include of lit.util to work here when using the wrapper script. It would be better to include that than to duplicate the code here.

================
Comment at: lit.site.cfg.in:21
@@ -20,1 +20,3 @@
+#config.target_executor          = "SSHExecutor('jroelofs', 'galois.local')"
+config.target_executor          = "SSHExecutor('jroelofs', '127.0.0.1')"
 
----------------
This part is obviously not supposed to go upstream, but I put it in the patch to show how to use it.

I think there are at least two common patterns that might be worth exposing through cmake:

```
config.target_executor = "SSHExecutor('username', 'hostname')"
```

```
config.target_executor = "PrefixExecutor('/path/to/run/script', LocalExecutor())"
```

Thoughts? Should we just pass the whole blob in on the cmake configure command line, or do something more sophisticated?

================
Comment at: remoteRun.py:8
@@ +7,3 @@
+def main():
+    # TODO(jroelofs): what's the best way of making this configurable?
+    executor = SSHExecutor('jroelofs', '127.0.0.1')
----------------
I considered passing this in as the first argument, and using eval. Better ideas?

http://reviews.llvm.org/D7380

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list