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