SkipManager

public class SkipManager
extends Object implements IDisableable

java.lang.Object
com.android.tradefed.result.skipped.SkipManager


跳过管理器会根据各种条件帮助确定应在 不同级别(调用、模块和测试)跳过的内容。

摘要

公共构造函数

SkipManager()

公共方法

void clearManager()
Map<String, SkipReason> getDemotedTests()

返回降级测试和降级原因

Map<String, Digest> getImageToDigest()
String getInvocationSkipReason()
Map<String, Digest> getTestArtifactsToDigest()
Set<String> getUnchangedModules()

返回未更改的模块列表。

boolean isConsideredForContentAnalysis()
boolean isDisabled()

如果整个对象都被停用(跳过设置和拆解),则返回 True。

void reportDiscoveryDependencies(List<String> modules, List<String> depFiles)
void reportDiscoveryWithNoTests()

在早期下载和发现过程中,向跳过管理器报告预计不会运行任何测试。

boolean reportInvocationSkippedModule()
void setDisable(boolean isDisabled)

设置是否应停用对象。

void setImageAnalysis(ITestDevice device, ContentAnalysisContext analysisContext)
void setSkipDecision(boolean shouldSkip)
void setTestArtifactsAnalysis(ContentAnalysisContext analysisContext)
void setup(IConfiguration config, IInvocationContext context)

设置并初始化跳过管理器。

boolean shouldSkipInvocation(TestInformation information, IConfiguration configuration)

报告是否应跳过当前调用。

公共构造函数

SkipManager

public SkipManager ()

公共方法

clearManager

public void clearManager ()

getDemotedTests

public Map<String, SkipReason> getDemotedTests ()

返回降级测试和降级原因

返回
Map<String, SkipReason>

getImageToDigest

public Map<String, Digest> getImageToDigest ()

返回
Map<String, Digest>

getInvocationSkipReason

public String getInvocationSkipReason ()

返回
String

getTestArtifactsToDigest

public Map<String, Digest> getTestArtifactsToDigest ()

返回
Map<String, Digest>

getUnchangedModules

public Set<String> getUnchangedModules ()

返回未更改的模块列表。只有在设备映像也 未更改的情况下,模块才不会更改。

返回
Set<String>

isConsideredForContentAnalysis

public boolean isConsideredForContentAnalysis ()

返回
boolean

isDisabled

public boolean isDisabled ()

如果整个对象都被停用(跳过设置和拆解),则返回 True。否则输出 false。

返回
boolean

reportDiscoveryDependencies

public void reportDiscoveryDependencies (List<String> modules, 
                List<String> depFiles)

参数
modules List

depFiles List

reportDiscoveryWithNoTests

public void reportDiscoveryWithNoTests ()

在早期下载和发现过程中,向跳过管理器报告预计不会运行任何测试。这应会导致跳过调用。

reportInvocationSkippedModule

public boolean reportInvocationSkippedModule ()

返回
boolean

setDisable

public void setDisable (boolean isDisabled)

设置是否应停用对象。停用意味着应跳过设置和拆解步骤 。可用于在默认 构造函数中将对象默认停用。

参数
isDisabled boolean:对象应处于的状态。

setImageAnalysis

public void setImageAnalysis (ITestDevice device, 
                ContentAnalysisContext analysisContext)

参数
device ITestDevice

analysisContext ContentAnalysisContext

setSkipDecision

public void setSkipDecision (boolean shouldSkip)

参数
shouldSkip boolean

setTestArtifactsAnalysis

public void setTestArtifactsAnalysis (ContentAnalysisContext analysisContext)

参数
analysisContext ContentAnalysisContext

setup

public void setup (IConfiguration config, 
                IInvocationContext context)

设置并初始化跳过管理器。

参数
config IConfiguration

context IInvocationContext

shouldSkipInvocation

public boolean shouldSkipInvocation (TestInformation information, 
                IConfiguration configuration)

报告是否应跳过当前调用。

参数
information TestInformation

configuration IConfiguration

返回值
boolean