MixKernelTargetPreparer

public class MixKernelTargetPreparer
extends BaseTargetPreparer implements IConfigurationReceiver, ILabPreparer

java.lang.Object
   ↳ com.android.tradefed.targetprep.BaseTargetPreparer
     ↳ com.android.tradefed.targetprep.MixKernelTargetPreparer


カーネル イメージとデバイス イメージを混合できる ITargetPreparer

概要

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

MixKernelTargetPreparer()

パブリック メソッド

void setConfiguration(IConfiguration configuration)

使用中の IConfiguration を挿入します。

void setUp(TestInformation testInfo)

テスト用にターゲットのセットアップを行います。

保護されたメソッド

String[] getKernelVersionFromImage(File image)

boot、vendor_boot、system_dlkm、vendor_dlkm のイメージ ファイルからカーネル バージョンを抽出します。

IRunUtil getRunUtil()

使用する IRunUtil インスタンスを取得します。

String[] parseKernelVersion(String source, String kernelVersionString)
void runMixKernelTool(ITestDevice device, File oldDeviceDir, File kernelDir, File gkiDir, File newDeviceDir)

mix カーネルツールを実行して新しいデバイスビルドを生成します。

ミキシング ツールの使用方法: build_mixed_kernels device_dir out_dir target flavor kernel_dir

void validateKernelCompatibility(String imageName, String[] imageVersion, String[] bootVersion, ITestDevice device)
void validateKernelVersion(File kernelDir, File gkiDir, ITestDevice device)

イメージ内のカーネル バージョンが想定どおりであることを検証します。

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

MixKernelTargetPreparer

public MixKernelTargetPreparer ()

パブリック メソッド

setConfiguration

public void setConfiguration (IConfiguration configuration)

使用中の IConfiguration を挿入します。

パラメータ
configuration IConfiguration

setUp

public void setUp (TestInformation testInfo)

テスト用にターゲットのセットアップを行います。

パラメータ
testInfo TestInformation: 呼び出しの TestInformation

例外
BuildError
DeviceNotAvailableException
TargetSetupError

保護されたメソッド

getKernelVersionFromImage

protected String[] getKernelVersionFromImage (File image)

boot/vendor_boot/system_dlkm/vendor_dlkm イメージ ファイルからカーネル バージョンを抽出します。

パラメータ
image File: 画像ファイルへの File

戻り値
String[] 解析されたカーネル バージョン情報([kernelVersion, patchLevel, pageSize])を含む ERROR(/String[])。バージョン文字列を解析できない場合は null を返します。

getRunUtil

protected IRunUtil getRunUtil ()

使用する IRunUtil インスタンスを取得します。

戻り値
IRunUtil 使用する IRunUtil

parseKernelVersion

protected String[] parseKernelVersion (String source, 
                String kernelVersionString)

パラメータ
source String

kernelVersionString String

戻り値
String[]

runMixKernelTool

protected void runMixKernelTool (ITestDevice device, 
                File oldDeviceDir, 
                File kernelDir, 
                File gkiDir, 
                File newDeviceDir)

mix カーネルツールを実行して新しいデバイスビルドを生成します。

ミキシング ツールの使用方法: build_mixed_kernels device_dir out_dir target flavor kernel_dir

パラメータ
device ITestDevice: テストデバイス

oldDeviceDir File: ディレクトリ File に古いデバイス イメージが含まれている

kernelDir File: ディレクトリ File にはカーネル イメージの宛先が含まれています

gkiDir File: ディレクトリ File に GKI カーネル イメージの宛先が含まれている

newDeviceDir File: 新しいデバイス イメージが生成されるディレクトリ File

例外
TargetSetupError ミックス カーネルツールの実行に失敗した場合
java.io.IOException

validateKernelCompatibility

protected void validateKernelCompatibility (String imageName, 
                String[] imageVersion, 
                String[] bootVersion, 
                ITestDevice device)

パラメータ
imageName String

imageVersion String

bootVersion String

device ITestDevice

例外
TargetSetupError

validateKernelVersion

protected void validateKernelVersion (File kernelDir, 
                File gkiDir, 
                ITestDevice device)

イメージ内のカーネル バージョンが想定どおりであることを検証します。有効でない場合は例外をスローします。

パラメータ
kernelDir File: ディレクトリ File にカーネル イメージが含まれている

gkiDir File: ディレクトリ File に GKI イメージが含まれています

device ITestDevice: ITestDevice

例外
TargetSetupError 有効な gki boot.img がない場合