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)

Runs the tests, and reports result to the 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

得分

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,>