カーネルターゲットテスト

public class KernelTargetTest
extends ExecutableTargetTest

java.lang.オブジェクト
com.android.tradefed.testtype.binary.ExecutableBaseTest
com.android.tradefed.testtype.binary.ExecutableTargetTest
com.android.tradefed.testtype.binary.KernelTargetTest


ターゲット上で実行可能ファイルを実行し、カーネル テストの結果を解析するためのテスト ランナー。

まとめ

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

KernelTargetTest ()

パブリックメソッド

boolean compareKernelVersion (String minKernelVersion)

カーネル バージョンがこのテストの最小カーネル バージョンを満たすか、それを超えているかどうかを確認します。

String findBinary (String binary)

findBinary でのバイナリ チェックをスキップします。

Integer getDeviceKernelVersion ()

uname -r を使用してデバイスのカーネルのバージョンを取得します。

Integer parseKernelVersion (String version)

カーネル バージョン、メジャー リビジョン、およびオプションでバージョン文字列からの最小リビジョンを数値比較に使用できる単一の整数に解析します。

void run ( TestInformation testInfo, ITestInvocationListener listener)

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

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

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

保護されたメソッド

void checkCommandResult ( CommandResult result, ITestInvocationListener listener, TestDescription description)

テストコマンドの結果を確認します。

boolean doesRunBinaryGenerateTestResults ()

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

カーネルターゲットテスト

public KernelTargetTest ()

パブリックメソッド

カーネルバージョンの比較

public boolean compareKernelVersion (String minKernelVersion)

カーネル バージョンがこのテストの最小カーネル バージョンを満たすか、それを超えているかどうかを確認します。

パラメーター
minKernelVersion String : 構成からの最小バージョン文字列。

戻り値
boolean

バイナリを見つける

public String findBinary (String binary)

findBinary でのバイナリ チェックをスキップします。 mSkipBinaryCheck と冗長ですが、下位互換性のために必要です。

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

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

投げる
DeviceNotAvailableException

getDeviceKernelVersion

public Integer getDeviceKernelVersion ()

uname -r を使用してデバイスのカーネルのバージョンを取得します。

戻り値
Integer

投げる
DeviceNotAvailableException

parseカーネルバージョン

public Integer parseKernelVersion (String version)

カーネル バージョン、メジャー リビジョン、およびオプションでバージョン文字列からの最小リビジョンを数値比較に使用できる単一の整数に解析します。

パラメーター
version String : Linux バージョン文字列。

戻り値
Integer

走る

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

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

パラメーター
testInfo TestInformation : テストを実行するために役立つ情報を含むTestInformationオブジェクト。

listener ITestInvocationListener : テスト結果のITestInvocationListener

投げる
DeviceNotAvailableException

ランバイナリ

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

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

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

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

description TestDescription : 進行中のテスト。

投げる
DeviceNotAvailableException

保護されたメソッド

checkコマンド結果

protected void checkCommandResult (CommandResult result, 
                ITestInvocationListener listener, 
                TestDescription description)

テストコマンドの結果を確認します。

パラメーター
result CommandResult : コマンドのテスト結果CommandResult

listener ITestInvocationListener : ITestInvocationListener

description TestDescription : 進行中のテスト。

doRunBinaryGenerateTestResults

protected boolean doesRunBinaryGenerateTestResults ()

戻り値
boolean