Commit Graph

15 Commits

Author SHA1 Message Date
Jordan Rose
1f9ef88ec1 [test] Check for sftp-server for remote-run --debug-as-local tests (#18759)
Not all systems have sftp-server installed.
2018-08-16 13:05:40 -07:00
Jordan Rose
feb8cb8538 [remote-run] Look for sftp-server in both /usr/libexec/ and /usr/lib/
This only matters for --debug-as-local mode anyway, but it looks like
Ubuntu OpenSSH doesn't use 'libexec'. (Maybe it's a Linux vs. BSD
thing.)
2018-08-08 20:20:07 -07:00
Jordan Rose
dd8c85ef81 [remote-run] Add help text to the options
(and reorder them so that the help text looks better)
2018-08-08 17:44:28 -07:00
Jordan Rose
15920eaa7b [remote-run] Reformat for 80 cols, use main() function for scoping
No functionality change.
2018-08-08 17:44:28 -07:00
Jordan Rose
b69f003489 [remote-run] Add -i/--identity to provide an SSH private key 2018-08-08 17:44:28 -07:00
Jordan Rose
b6bb375d5a [remote-run] Allow specifying the SSH port using 'host:port' syntax
ssh itself doesn't support this for its primary hostname, but it's
pretty standard elsewhere.
2018-08-08 17:44:28 -07:00
Jordan Rose
0aed9e05cc [remote-run] Add a -n/--dry-run mode that /just/ dumps commands
Like -v, but doesn't actually run anything.
2018-08-08 17:44:28 -07:00
Jordan Rose
a64ac39af0 [remote-run] Add -v/--verbose to dump shell and SFTP commands 2018-08-08 17:44:28 -07:00
Jordan Rose
d625e08479 [remote-run] Allow custom input/output prefixes on the remote side
This is mostly important to allow remote-run to be used to upload
files generally, while still using the same interface and arguments
that will be used to actually run executables.
2018-08-08 17:44:28 -07:00
Jordan Rose
1a0912c9b7 [remote-run] Pass stdout through directly too
This makes sure it's still printed when the remote process exits
abnormally.
2018-08-08 17:44:28 -07:00
Jordan Rose
9947e6f1c6 [remote-run] Pass through stderr for sftp failures
(mostly for human debugging)
2018-08-08 17:44:28 -07:00
Jordan Rose
a10be46488 [remote-run] --source-dir/test-dir to --input-prefix/output-prefix
This handles things like "%t.dylib" that some tests use.
2018-08-08 17:42:55 -07:00
Jordan Rose
10259e181f [remote-run] Send environment variables to the remote process
Taking a cue from Apple's 'simctl' tool, send over any variables
prefixed with REMOTE_RUN_CHILD_ (after stripping the prefix).
2018-08-08 17:42:55 -07:00
Jordan Rose
e147a4fc1b [remote-run] Pass stderr output through directly
Also, handle early exit codes
2018-08-08 17:42:55 -07:00
Jordan Rose
74da057e13 [test] Start work on 'remote-run', to run executable tests over SSH
(instead of locally)

The primary use case I'm looking at is easier testing across macOS
versions, but it could also be used for cross-compilation tests in
general (someday).
2018-08-08 17:42:55 -07:00