ExecutableBaseTest

public abstract class ExecutableBaseTest
extends Object implements IRemoteTest , IRuntimeHintProvider , ITestCollector , IShardableTest , IAbiReceiver , ITestFilterReceiver , IDiscoverDependencies

java.lang.Object
com.android.tradefed.testtype.binary.ExecutableBaseTest


テストの実行可能なスタイルの基本クラス。例: バイナリ、シェル スクリプト。

まとめ

田畑

public static final String NO_BINARY_ERROR

パブリック コンストラクター

ExecutableBaseTest ()

公開メソッド

void addAllExcludeFilters ( filters) addAllExcludeFilters ( filters)

除外するテストのフィルターのERROR(/Set)を追加します。

void addAllIncludeFilters ( filters) addAllIncludeFilters ( filters)

含めるテストのフィルターのERROR(/Set)を追加します。

void addExcludeFilter (String filter)

除外するテストのフィルターを追加します。

void addIncludeFilter (String filter)

含めるテストのフィルターを追加します。

void clearExcludeFilters ()

現在追跡されているすべての除外フィルターを削除します。

void clearIncludeFilters ()

現在追跡されているすべての包含フィルターを削除します。

abstract String findBinary (String binary)

バイナリを検索して実行できるようにします。

IAbi getAbi ()

getExcludeFilters ()

除外フィルターの現在のERROR(/Set)を返します。

getIncludeFilters ()

インクルード フィルターの現在のERROR(/Set)を返します。

final long getRuntimeHint ()

テストの予想実行時間をミリ秒単位で返します。

reportDependencies ()
void run ( TestInformation testInfo, ITestInvocationListener listener)

テストを実行し、結果をリスナーに報告します。

abstract void runBinary (String binaryPath, ITestInvocationListener listener, TestDescription description)

指定されたパスでバイナリを実際に実行します。

final void setAbi ( IAbi abi)

final void setCollectTestsOnly (boolean shouldCollectTest)

テスト収集モードを有効または無効にします

final split (int shardHint)

実行しようとする shardCount も提供するsplit()の代替バージョン。

保護されたメソッド

long getTimeoutPerBinaryMs ()

田畑

NO_BINARY_ERROR

public static final String NO_BINARY_ERROR

パブリック コンストラクター

ExecutableBaseTest

public ExecutableBaseTest ()

公開メソッド

addAllExcludeFilters

public void addAllExcludeFilters ( filters)

除外するテストのフィルターのERROR(/Set)を追加します。

パラメーター
filters

addAllIncludeFilters

public void addAllIncludeFilters ( filters)

含めるテストのフィルターのERROR(/Set)を追加します。

パラメーター
filters

addExcludeFilter

public void addExcludeFilter (String filter)

除外するテストのフィルターを追加します。

パラメーター
filter String

addIncludeFilter

public void addIncludeFilter (String filter)

含めるテストのフィルターを追加します。

パラメーター
filter String

clearExcludeFilters

public void clearExcludeFilters ()

現在追跡されているすべての除外フィルターを削除します。

clearIncludeFilters

public void clearIncludeFilters ()

現在追跡されているすべての包含フィルターを削除します。

findBinary

public abstract String findBinary (String binary)

バイナリを検索して実行できるようにします。

パラメーター
binary String : バイナリのパスまたは単にバイナリ名。

戻り値
Stringバイナリへのパス、または見つからない場合は null。

スロー
DeviceNotAvailableException

getAbi

public IAbi getAbi ()

戻り値
IAbi

getExcludeFilters

public  getExcludeFilters ()

除外フィルターの現在のERROR(/Set)を返します。

戻り値

getIncludeFilters

public  getIncludeFilters ()

インクルード フィルターの現在のERROR(/Set)を返します。

戻り値

getRuntimeHint

public final long getRuntimeHint ()

テストの予想実行時間をミリ秒単位で返します。この時間は、シャード実行の負荷分散に使用されます

戻り値
long

レポートの依存関係

public  reportDependencies ()

戻り値

走る

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

テストを実行し、結果をリスナーに報告します。

パラメーター
testInfo TestInformation : テストを実行するための有用な情報を含むTestInformationオブジェクト。

listener ITestInvocationListener : テスト結果のITestInvocationListener

スロー
DeviceNotAvailableException

runBinary

public abstract void runBinary (String binaryPath, 
                ITestInvocationListener listener, 
                TestDescription description)

指定されたパスでバイナリを実際に実行します。

パラメーター
binaryPath String : バイナリのパス。

listener ITestInvocationListener : 結果を報告するリスナー。

description TestDescription : 進行中のテスト。

スロー
DeviceNotAvailableException

setAbi

public final void setAbi (IAbi abi)

パラメーター
abi IAbi

setCollectTestsOnly

public final void setCollectTestsOnly (boolean shouldCollectTest)

テスト収集モードを有効または無効にします

スプリット

public final  split (int shardHint)

実行しようとする shardCount も提供するsplit()の代替バージョン。これは、時々任意に決定できないテスト ランナーに役立ちます。

パラメーター
shardHint int : 試行されたシャード数。

戻り値
個別に実行されるサブテストのコレクション、またはテストが現在シャード可能でない場合はnull

保護されたメソッド

getTimeoutPerBinaryMs

protected long getTimeoutPerBinaryMs ()

戻り値
long実行のために各バイナリに適用されるタイムアウト。