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()
|
|
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 |
|
得分
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 |
|
受保护的方法
doesRunBinaryGenerateTestResults
protected boolean doesRunBinaryGenerateTestResults ()
| 返回 | |
|---|---|
boolean |
|
getAllTestCommands
protectedgetAllTestCommands ()
将 mBinaryPaths 转换为 mTestCommands,以保持一致。
| 返回 | |
|---|---|
|
一个包含 testCommands 的 MapERROR(/LinkedHashMap)<string, string="">。</string,> |