呼び出しコンテキスト

public class InvocationContext
extends Object implements IInvocationContext

java.lang.Object
com.android.tradefed.invoker.InvocationContext


IInvocationContextの汎用実装。

まとめ

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

InvocationContext ()

デフォルトの属性値を使用してBuildInfoを作成します。

公開メソッド

void addAllocatedDevice ( deviceWithName) addAllocatedDevice ( deviceWithName)

ITestDeviceに関連付けられた構成デバイス名のマップを追跡します。

void addAllocatedDevice (String devicename, ITestDevice testDevice)

デバイスの割り当て時にメタデータによって追跡される ITestDevice を追加します。

void addDeviceBuildInfo (String deviceName, IBuildInfo buildinfo)

デバイス構成名で追跡するIBuildInfoを追加します。

void addInvocationAttribute (String attributeName, String attributeValue)

呼び出し属性を追加します。

void addInvocationAttributes ( MultiMap <String, String> attributesMap)

UniqueMultiMapを介して一度に複数の呼び出し属性を追加します。

void addSerialsFromShard (Integer index, serials) addSerialsFromShard (Integer index, serials)

いくつかのテストを実行しているシャードの 1 つに割り当てられたものとして追跡されるシリアルを追加します。

static InvocationContext fromProto (InvocationContext.Context protoContext)

InvocationContext#toProto()の逆操作でインスタンスを取得します。

MultiMap <String, String> getAttributes ()

すべての呼び出し属性を含むマップのコピーを返します。

IBuildInfo getBuildInfo (String deviceName)

指定されたデバイス構成名に関連付けられたIBuildInfoを返します。

IBuildInfo getBuildInfo ( ITestDevice testDevice)

ITestDeviceに関連付けられたIBuildInfoを返します

String getBuildInfoName ( IBuildInfo info)

IBuildInfoから xml 構成に設定されたデバイスの名前を返します。

getBuildInfos ()

この呼び出しで追跡されたすべてのIBuildInfoを返します。

ConfigurationDescriptor getConfigurationDescriptor ()

呼び出しを開始したテスト構成に関連付けられた記述子を返します

ITestDevice getDevice (String deviceName)

指定されたデバイス構成名に関連付けられたITestDeviceを返します。

getDeviceBuildMap ()

デバイス/ビルド情報の関連付けのマップを返す

ITestDevice getDeviceBySerial (String serial)

提供されたシリアルに関連付けられたITestDeviceを返します。

getDeviceConfigNames ()

この呼び出しで追跡されたデバイスのデバイス構成名のリストを返します

String getDeviceName ( ITestDevice device)

ITestDeviceからの xml 構成で設定されたデバイスの名前を返します。

getDevices ()

この呼び出しで追跡された、割り当てられたすべてのデバイスを返します。

String getInvocationId ()
IInvocationContext getModuleInvocationContext ()

スイートの一部として実行されているモジュールの呼び出しコンテキストを返します。

int getNumDevicesAllocated ()

呼び出しに割り当てられたデバイスの数を返します。

getSerials ()

この呼び出しで追跡されたデバイスのシリアルのリストを返します

getShardsSerials ()

シャーディングに関係するすべての追跡されたシリアルとそのシャードのマップを返します。

String getTestTag ()

呼び出しテストタグを返します。

void lockAttributes ()

コンテキストをロックして、これ以上呼び出し属性が追加されないようにします。

void logInvocationMetrics ()

InvocationMetricLogger属性を呼び出しに記録します。

void markReleasedEarly ()

デバイスが早期にリリースされることをマークします。

void setConfigurationDescriptor ( ConfigurationDescriptor configurationDescriptor)

呼び出しを開始したテスト構成に関連付けられた記述子を設定します

void setModuleInvocationContext ( IInvocationContext invocationContext)

スイートの一部として実行されているモジュールの呼び出しコンテキストを設定します。

void setRecoveryModeForAllDevices ( ITestDevice.RecoveryMode mode)

コンテキストのすべてのデバイス部分のRecoveryModeを設定します

void setTestTag (String testTag)

呼び出しテスト タグを設定します。

InvocationContext.Context toProto ()

コンテキスト インスタンスを protobuf にシリアル化します。

boolean wasReleasedEarly ()

デバイスが早期にリリースされ、今後使用されないかどうかを返します。

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

呼び出しコンテキスト

public InvocationContext ()

デフォルトの属性値を使用してBuildInfoを作成します。

公開メソッド

addAllocatedDevice

public void addAllocatedDevice ( deviceWithName)

ITestDeviceに関連付けられた構成デバイス名のマップを追跡します。追加する前に以前のトラッキングをクリアしません。

パラメーター
deviceWithName : 追跡する追加デバイスのERROR(/Map)

addAllocatedDevice

public void addAllocatedDevice (String devicename, 
                ITestDevice testDevice)

デバイスの割り当て時にメタデータによって追跡される ITestDevice を追加します。マップでビルド情報を null に設定します。

パラメーター
devicename String : ITestDeviceに関連付けるデバイス構成名

testDevice ITestDevice : 割り当てられたデバイスに追加されます。

addDeviceBuildInfo

public void addDeviceBuildInfo (String deviceName, 
                IBuildInfo buildinfo)

デバイス構成名で追跡するIBuildInfoを追加します。

パラメーター
deviceName String : デバイス構成名

buildinfo IBuildInfo : デバイス構成名に関連付けられたIBuildInfo

addInvocationAttribute

public void addInvocationAttribute (String attributeName, 
                String attributeValue)

呼び出し属性を追加します。

パラメーター
attributeName String

attributeValue String

addInvocationAttributes

public void addInvocationAttributes (MultiMap<String, String> attributesMap)

UniqueMultiMapを介して一度に複数の呼び出し属性を追加します。

パラメーター
attributesMap MultiMap

addSerialsFromShard

public void addSerialsFromShard (Integer index, 
                 serials)

いくつかのテストを実行しているシャードの 1 つに割り当てられたものとして追跡されるシリアルを追加します。

パラメーター
index Integer : シリアルを使用したシャードのインデックス

serials : 追跡するシリアルのリスト。

fromプロト

public static InvocationContext fromProto (InvocationContext.Context protoContext)

InvocationContext#toProto()の逆操作でインスタンスを取得します。

パラメーター
protoContext InvocationContext.Context

戻り値
InvocationContext

getAttributes

public MultiMap<String, String> getAttributes ()

すべての呼び出し属性を含むマップのコピーを返します。

戻り値
MultiMap <String, String>

getBuildInfo

public IBuildInfo getBuildInfo (String deviceName)

指定されたデバイス構成名に関連付けられたIBuildInfoを返します。 deviceName が一致しない場合は null を返します。

パラメーター
deviceName String

戻り値
IBuildInfo

getBuildInfo

public IBuildInfo getBuildInfo (ITestDevice testDevice)

ITestDeviceに関連付けられたIBuildInfoを返します

パラメーター
testDevice ITestDevice

戻り値
IBuildInfo

getBuildInfoName

public String getBuildInfoName (IBuildInfo info)

IBuildInfoから xml 構成に設定されたデバイスの名前を返します。 IBuildInfo が一致しない場合は null を返します

パラメーター
info IBuildInfo

戻り値
String

getBuildInfos

public  getBuildInfos ()

この呼び出しで追跡されたすべてのIBuildInfoを返します。

戻り値

getConfigurationDescriptor

public ConfigurationDescriptor getConfigurationDescriptor ()

呼び出しを開始したテスト構成に関連付けられた記述子を返します

戻り値
ConfigurationDescriptor

getDevice

public ITestDevice getDevice (String deviceName)

指定されたデバイス構成名に関連付けられたITestDeviceを返します。

パラメーター
deviceName String

戻り値
ITestDevice

getDeviceBuildMap

public  getDeviceBuildMap ()

デバイス/ビルド情報の関連付けのマップを返す

戻り値

getDeviceBySerial

public ITestDevice getDeviceBySerial (String serial)

提供されたシリアルに関連付けられたITestDeviceを返します。最速のルックアップではないため、あまり使用しないでください。

パラメーター
serial String

戻り値
ITestDevice

getDeviceConfigNames

public  getDeviceConfigNames ()

この呼び出しで追跡されたデバイスのデバイス構成名のリストを返します

戻り値

getDeviceName

public String getDeviceName (ITestDevice device)

ITestDeviceからの xml 構成で設定されたデバイスの名前を返します。 ITestDevice が一致しない場合は null を返します。

パラメーター
device ITestDevice

戻り値
String

getDevices

public  getDevices ()

この呼び出しで追跡された、割り当てられたすべてのデバイスを返します。

戻り値

getInvocationId

public String getInvocationId ()

戻り値
String

getModuleInvocationContext

public IInvocationContext getModuleInvocationContext ()

スイートの一部として実行されているモジュールの呼び出しコンテキストを返します。

戻り値
IInvocationContext

getNumDevicesAllocated

public int getNumDevicesAllocated ()

呼び出しに割り当てられたデバイスの数を返します。

戻り値
int

getSerials

public  getSerials ()

この呼び出しで追跡されたデバイスのシリアルのリストを返します

戻り値

getShardsSerials

public  getShardsSerials ()

シャーディングに関係するすべての追跡されたシリアルとそのシャードのマップを返します。分割された呼び出しでない場合は空です。

戻り値

getTestTag

public String getTestTag ()

呼び出しテストタグを返します。

戻り値
String

ロック属性

public void lockAttributes ()

コンテキストをロックして、これ以上呼び出し属性が追加されないようにします。

logInvocationMetrics

public void logInvocationMetrics ()

InvocationMetricLogger属性を呼び出しに記録します。

markReleasedEarly

public void markReleasedEarly ()

デバイスが早期にリリースされることをマークします。

setConfigurationDescriptor

public void setConfigurationDescriptor (ConfigurationDescriptor configurationDescriptor)

呼び出しを開始したテスト構成に関連付けられた記述子を設定します

パラメーター
configurationDescriptor ConfigurationDescriptor

setModuleInvocationContext

public void setModuleInvocationContext (IInvocationContext invocationContext)

スイートの一部として実行されているモジュールの呼び出しコンテキストを設定します。

パラメーター
invocationContext IInvocationContext

setRecoveryModeForAllDevices

public void setRecoveryModeForAllDevices (ITestDevice.RecoveryMode mode)

コンテキストのすべてのデバイス部分のRecoveryModeを設定します

パラメーター
mode ITestDevice.RecoveryMode

setTestTag

public void setTestTag (String testTag)

呼び出しテスト タグを設定します。

パラメーター
testTag String

toProto

public InvocationContext.Context toProto ()

コンテキスト インスタンスを protobuf にシリアル化します。

戻り値
InvocationContext.Context

早くリリースされた

public boolean wasReleasedEarly ()

デバイスが早期にリリースされ、今後使用されないかどうかを返します。

戻り値
boolean