KTap結果解析器
public class KTapResultParser
extends Object
java.lang.Object | |
↳ | com.android.tradefed.testtype.binary.KTapResultParser |
讀取由 KUnit 測試模組產生的 KTAP 輸出,並將其放置在 debugfs 下的「結果」檔案中。
此實作基於官方文件 kunit_parser.py 和測試期間發現的特定警告。需要額外的邏輯:
- 縮排被忽略,因為它在使用中不一致。
- 需要以“# Subtest:”開頭的行才能正確嵌套到子測試組中。此方法取自 kunit_parser.py。
- 有時,當不使用“#”時,“-”會出現在測試名稱和診斷資料後面。一遇到就被剝掉。
- 從技術上講,測試名稱可以包含除“#”之外的任何字元。當轉換為 TF 測試結果時,這可能會成為一個問題。目前唯一的後處理就是用底線取代空格。
概括
公共構造函數 | |
---|---|
KTapResultParser () |
公共方法 | |
---|---|
static void | applyKTapResultToListener ( ITestInvocationListener listener, String testRunName, String ktapFileContent, KTapResultParser.ParseResolution resolution) |
公共構造函數
KTap結果解析器
public KTapResultParser ()
公共方法
應用KTapResultToListener
public static void applyKTapResultToListener (ITestInvocationListener listener, String testRunName, String ktapFileContent, KTapResultParser.ParseResolution resolution)
參數 | |
---|---|
listener | ITestInvocationListener |
testRunName | String |
ktapFileContent | String |
resolution | KTapResultParser.ParseResolution |