호출컨텍스트

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)

일부 테스트를 실행하는 샤드 중 하나에 할당된 것으로 추적할 일련 번호를 추가합니다.

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 만듭니다.

공개 메소드

추가할당된 장치

public void addAllocatedDevice ( deviceWithName)

ITestDevice 에 연결된 구성 장치 이름의 맵을 추적합니다. 추가하기 전에 이전 추적을 지우지 않습니다.

매개변수
deviceWithName : 추적할 추가 장치의 ERROR(/Map)

추가할당된 장치

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)

일부 테스트를 실행하는 샤드 중 하나에 할당된 것으로 추적할 일련 번호를 추가합니다.

매개변수
index Integer : 시리얼을 이용한 샤드의 인덱스

serials : 추적할 연재물 목록입니다.

프롬프로토

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

getNumDevices할당됨

public int getNumDevicesAllocated ()

호출에 할당된 장치 수를 반환합니다.

보고
int

getSerials

public  getSerials ()

이 호출에서 추적된 장치의 일련번호 목록을 반환합니다.

보고

getShardsSerials

public  getShardsSerials ()

추적된 모든 연재물과 샤딩과 관련된 해당 샤드의 맵을 반환합니다. 샤딩된 호출이 아닌 경우 비어 있습니다.

보고

getTestTag

public String getTestTag ()

호출 테스트 태그를 반환합니다.

보고
String

잠금 속성

public void lockAttributes ()

더 많은 호출 속성이 추가되지 않도록 컨텍스트를 잠급니다.

logInvocationMetrics

public void logInvocationMetrics ()

InvocationMetricLogger 특성을 호출에 기록합니다.

마크조기출시

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

투프로토

public InvocationContext.Context toProto ()

컨텍스트 인스턴스를 protobuf로 직렬화합니다.

보고
InvocationContext.Context

일찍 출시되었습니다

public boolean wasReleasedEarly ()

장치가 조기에 출시되어 더 이상 사용되지 않을지 여부를 반환합니다.

보고
boolean