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

ホームラン

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

保護されたメソッド

checkCommandResult

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

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

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

listener ITestInvocationListener: ITestInvocationListener

description TestDescription: 進行中のテスト。

doesRunBinaryGenerateTestResults

protected boolean doesRunBinaryGenerateTestResults ()

戻り値
boolean