KernelTargetTest

public class KernelTargetTest
extends ExecutableTargetTest

java.lang.Object
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()

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

KernelTargetTest

public KernelTargetTest ()

パブリック メソッド

compareKernelVersion

public boolean compareKernelVersion (String minKernelVersion)

カーネル バージョンがこのテストの最小カーネル バージョン以上であるかどうかを確認します。

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

戻り値
boolean

findBinary

public String findBinary (String binary)

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

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

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

例外
DeviceNotAvailableException

getDeviceKernelVersion

public Integer getDeviceKernelVersion ()

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

戻り値
Integer

例外
DeviceNotAvailableException

parseKernelVersion

public Integer parseKernelVersion (String version)

カーネル バージョン、メジャー リビジョン、最小リビジョン(省略可)を バージョン文字列から解析して、数値比較に使用できる単一の整数にします。

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

戻り値
Integer

run

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

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

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

listener ITestInvocationListener: テスト結果の ITestInvocationListener

例外
DeviceNotAvailableException

runBinary

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

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

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

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

description TestDescription: 進行中のテスト。

例外
DeviceNotAvailableException
IOException

保護されたメソッド

checkCommandResult

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

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

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

listener ITestInvocationListener: ITestInvocationListener

description TestDescription: 進行中のテスト。

doesRunBinaryGenerateTestResults

protected boolean doesRunBinaryGenerateTestResults ()

戻り値
boolean