RemoteSshUtil
public class RemoteSshUtil
extends Object
java.lang.Object | |
↳ | com.android.tradefed.device.cloud.RemoteSshUtil |
在远程实例上执行 ssh 命令的实用程序。
概括
公共构造函数 | |
---|---|
RemoteSshUtil () |
公共方法 | |
---|---|
static CommandResult | remoteSshCommandExec ( GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeoutMs, OutputStream stdout, OutputStream stderr, String... command) 使用 ssh 在远程实例上执行命令。 |
static CommandResult | remoteSshCommandExec ( GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeoutMs, String... command) 使用 ssh 在远程实例上执行命令。 |
公共构造函数
RemoteSshUtil
public RemoteSshUtil ()
公共方法
remoteSshCommandExec
public static CommandResult remoteSshCommandExec (GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeoutMs, OutputStream stdout, OutputStream stderr, String... command)
使用 ssh 在远程实例上执行命令。
参数 | |
---|---|
remoteInstance | GceAvdInfo :描述设备的GceAvdInfo 。 |
options | TestDeviceOptions :一个TestDeviceOptions 描述用于 GCE 设备的设备选项。 |
runUtil | IRunUtil :用于执行命令的IRunUtil 。 |
timeoutMs | long :以毫秒为单位完成提取 |
stdout | OutputStream :将记录 stdout 的ERROR(/OutputStream) 。 |
stderr | OutputStream :将记录 stderr ERROR(/OutputStream) 。 |
command | String :要执行的命令。 |
退货 | |
---|---|
CommandResult | 包含状态和日志的CommandResult 。 |
remoteSshCommandExec
public static CommandResult remoteSshCommandExec (GceAvdInfo remoteInstance, TestDeviceOptions options, IRunUtil runUtil, long timeoutMs, String... command)
使用 ssh 在远程实例上执行命令。
参数 | |
---|---|
remoteInstance | GceAvdInfo :描述设备的GceAvdInfo 。 |
options | TestDeviceOptions :一个TestDeviceOptions 描述用于 GCE 设备的设备选项。 |
runUtil | IRunUtil :用于执行命令的IRunUtil 。 |
timeoutMs | long :以毫秒为单位完成提取 |
command | String :要执行的命令。 |
退货 | |
---|---|
CommandResult | 包含状态和日志的CommandResult 。 |