KUnitModuleTest

public class KUnitModuleTest
extends ExecutableTargetTest

java.lang.Object
com.android.tradefed.testtype.binary.ExecutableBaseTest
  com.android.tradefed.testtype.binary.ExecutableTargetTest
    com.android.tradefed.testtype.binary.KUnitModuleTest


用于在设备上运行 KUnit 测试模块的测试运行程序。

摘要

字段

public static final String KUNIT_DEBUGFS_PATH

public static final String KUNIT_RESULTS_FMT

公共构造函数

KUnitModuleTest()

公共方法

String findBinary(String binary)

搜索二进制文件以便能够运行它。

boolean getCollectTestsOnly()
void run(TestInformation testInfo, ITestInvocationListener listener)

运行测试,并将结果报告给监听器。

void runBinary(String modulePath, ITestInvocationListener listener, TestDescription description)

实际运行给定路径中的二进制文件。

受保护的方法

boolean doesRunBinaryGenerateTestResults()
Map<String, String> getAllTestCommands()

将 mBinaryPaths 转换为 mTestCommands 以保持一致性。

字段

KUNIT_DEBUGFS_PATH

public static final String KUNIT_DEBUGFS_PATH

KUNIT_RESULTS_FMT

public static final String KUNIT_RESULTS_FMT

公共构造函数

KUnitModuleTest

public KUnitModuleTest ()

公共方法

findBinary

public String findBinary (String binary)

搜索二进制文件以便能够运行它。

参数
binary String:二进制文件的路径,或仅为二进制文件名。

返回
String 二进制文件的路径,如果未找到,则返回 null。

抛出
DeviceNotAvailableException

getCollectTestsOnly

public boolean getCollectTestsOnly ()

返回
boolean

run

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

运行测试,并将结果报告给监听器。

参数
testInfo TestInformation:包含用于运行测试的 TestInformation 对象。

listener ITestInvocationListener:测试结果的 ITestInvocationListener

抛出
DeviceNotAvailableException

runBinary

public void runBinary (String modulePath, 
                ITestInvocationListener listener, 
                TestDescription description)

实际运行给定路径中的二进制文件。

参数
modulePath String:二进制文件的路径。

listener ITestInvocationListener:用于报告结果的监听器。

description TestDescription:正在进行的测试。

抛出
DeviceNotAvailableException
IOException

受保护的方法

doesRunBinaryGenerateTestResults

protected boolean doesRunBinaryGenerateTestResults ()

返回
boolean

getAllTestCommands

protected Map<String, String> getAllTestCommands ()

将 mBinaryPaths 转换为 mTestCommands 以保持一致性。

返回
Map<String, String> 测试命令的 MapLinkedHashMap<string, string="">。

</string,>