CommandUtil

public final class CommandUtil
extends Object

java.lang.Object
com.android.sts.common.CommandUtil


adb を介してデバイスでコマンドを実行するのに役立つユーティリティのコレクション

概要

公開メソッド

static CommandResult runAndCheck (ITestDevice device, String cmd, int retries)

デバイスでシェル コマンドを実行し、コマンドが 0 を返さない場合は AssumptionError をスローします。

static CommandResult runAndCheck (ITestDevice device, String cmd)

デバイスでシェル コマンドを実行し、コマンドが 0 を返さない場合は AssumptionError をスローします。

公開メソッド

runAndCheck

public static CommandResult runAndCheck (ITestDevice device, 
                String cmd, 
                int retries)

デバイスでシェル コマンドを実行し、コマンドが 0 を返さない場合は AssumptionError をスローします。

パラメーター
device ITestDevice : 使用するデバイス

cmd String : 実行するコマンド

retries int : 試行する再試行回数

戻り値
CommandResult device.executeShellV2Command の結果

スロー
DeviceNotAvailableException

runAndCheck

public static CommandResult runAndCheck (ITestDevice device, 
                String cmd)

デバイスでシェル コマンドを実行し、コマンドが 0 を返さない場合は AssumptionError をスローします。

パラメーター
device ITestDevice : 使用するデバイス

cmd String : 実行するコマンド

戻り値
CommandResult device.executeShellV2Command の結果

スロー
DeviceNotAvailableException