InvocationContext
public
class
InvocationContext
extends Object
implements
IInvocationContext
java.lang.Object | |
↳ | com.android.tradefed.invoker.InvocationContext |
IInvocationContext
的通用实现。
摘要
公共构造函数 | |
---|---|
InvocationContext()
使用默认属性值创建 |
公共方法 | |
---|---|
void
|
addAllocatedDevice(
|
void
|
addAllocatedDevice(String devicename, ITestDevice testDevice)
|
void
|
addDeviceBuildInfo(String deviceName, IBuildInfo buildinfo)
|
void
|
addInvocationAttribute(String attributeName, String attributeValue)
|
void
|
addInvocationAttributes(MultiMap<String, String> attributesMap)
|
void
|
addSerialsFromShard(Integer index,
|
static
InvocationContext
|
fromProto(InvocationContext.Context protoContext)
对 |
MultiMap<String, String>
|
getAttributes()
|
IBuildInfo
|
getBuildInfo(String deviceName)
|
IBuildInfo
|
getBuildInfo(ITestDevice testDevice)
|
String
|
getBuildInfoName(IBuildInfo info)
|
|
getBuildInfos()
|
ConfigurationDescriptor
|
getConfigurationDescriptor()
|
ITestDevice
|
getDevice(String deviceName)
|
|
getDeviceBuildMap()
|
ITestDevice
|
getDeviceBySerial(String serial)
|
|
getDeviceConfigNames()
|
String
|
getDeviceName(ITestDevice device)
|
|
getDevices()
|
String
|
getInvocationId()
|
IInvocationContext
|
getModuleInvocationContext()
|
int
|
getNumDevicesAllocated()
|
|
getSerials()
|
|
getShardsSerials()
|
String
|
getTestTag()
|
void
|
lockAttributes()
锁定上下文以防止添加更多调用属性。 |
void
|
logInvocationMetrics()
将 |
void
|
markReleasedEarly()
|
void
|
setConfigurationDescriptor(ConfigurationDescriptor configurationDescriptor)
|
void
|
setModuleInvocationContext(IInvocationContext invocationContext)
|
void
|
setRecoveryModeForAllDevices(ITestDevice.RecoveryMode mode)
|
void
|
setTestTag(String testTag)
|
InvocationContext.Context
|
toProto()
|
boolean
|
wasReleasedEarly()
|
公共构造函数
公共方法
addAllocatedDevice
public void addAllocatedDevice (deviceWithName)
参数 | |
---|---|
deviceWithName |
|
addAllocatedDevice
public void addAllocatedDevice (String devicename, ITestDevice testDevice)
参数 | |
---|---|
devicename |
String |
testDevice |
ITestDevice |
addDeviceBuildInfo
public void addDeviceBuildInfo (String deviceName, IBuildInfo buildinfo)
参数 | |
---|---|
deviceName |
String |
buildinfo |
IBuildInfo |
addInvocationAttribute
public void addInvocationAttribute (String attributeName, String attributeValue)
参数 | |
---|---|
attributeName |
String |
attributeValue |
String |
addInvocationAttributes
public void addInvocationAttributes (MultiMap<String, String> attributesMap)
参数 | |
---|---|
attributesMap |
MultiMap |
addSerialsFromShard
public void addSerialsFromShard (Integer index,serials)
参数 | |
---|---|
index |
Integer |
serials |
|
fromProto
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)
参数 | |
---|---|
deviceName |
String |
返回 | |
---|---|
IBuildInfo |
getBuildInfo
public IBuildInfo getBuildInfo (ITestDevice testDevice)
参数 | |
---|---|
testDevice |
ITestDevice |
返回 | |
---|---|
IBuildInfo |
getBuildInfoName
public String getBuildInfoName (IBuildInfo info)
参数 | |
---|---|
info |
IBuildInfo |
返回 | |
---|---|
String |
getBuildInfos
publicgetBuildInfos ()
返回 | |
---|---|
|
getConfigurationDescriptor
public ConfigurationDescriptor getConfigurationDescriptor ()
返回 | |
---|---|
ConfigurationDescriptor |
getDevice
public ITestDevice getDevice (String deviceName)
参数 | |
---|---|
deviceName |
String |
返回 | |
---|---|
ITestDevice |
getDeviceBuildMap
publicgetDeviceBuildMap ()
返回 | |
---|---|
|
getDeviceBySerial
public ITestDevice getDeviceBySerial (String serial)
参数 | |
---|---|
serial |
String |
返回 | |
---|---|
ITestDevice |
getDeviceConfigNames
publicgetDeviceConfigNames ()
返回 | |
---|---|
|
getDeviceName
public String getDeviceName (ITestDevice device)
参数 | |
---|---|
device |
ITestDevice |
返回 | |
---|---|
String |
getDevices
publicgetDevices ()
返回 | |
---|---|
|
getInvocationId
public String getInvocationId ()
返回 | |
---|---|
String |
getModuleInvocationContext
public IInvocationContext getModuleInvocationContext ()
返回 | |
---|---|
IInvocationContext |
getNumDevicesAllocated
public int getNumDevicesAllocated ()
返回 | |
---|---|
int |
getSerials
publicgetSerials ()
返回 | |
---|---|
|
getShardsSerials
publicgetShardsSerials ()
返回 | |
---|---|
|
getTestTag
public String getTestTag ()
返回 | |
---|---|
String |
lockAttributes
public void lockAttributes ()
锁定上下文以防止添加更多调用属性。
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)
参数 | |
---|---|
mode |
ITestDevice.RecoveryMode |
setTestTag
public void setTestTag (String testTag)
参数 | |
---|---|
testTag |
String |
toProto
public InvocationContext.Context toProto ()
返回 | |
---|---|
InvocationContext.Context |
wasReleasedEarly
public boolean wasReleasedEarly ()
返回 | |
---|---|
boolean |