GTestListTestParser

public class GTestListTestParser
extends MultiLineReceiver

java.lang.Object
com.android.ddmlib.MultiLineReceiver
  com.android.tradefed.testtype.GTestListTestParser


用于 gtest 试运行模式(带“--gtest_list_tests”参数)的结果解析器。

摘要

字段

protected List<TestDescription> mTests

公共构造函数

GTestListTestParser(String testRunName, ITestInvocationListener listener)

为单个监听器创建 GTestListTestParser。

GTestListTestParser(String testRunName, ITestInvocationListener listener, boolean shouldCollectDisabledTest)

为单个监听器创建 GTestListTestParser。

公共方法

void done()

终止进程。

boolean getPrependFileName()
boolean isCancelled()

void processNewLines(String[] lines)

当远程进程收到新行时调用。

void setPrependFileName(boolean prepend)

字段

mTests

protected List<TestDescription> mTests

公共构造函数

GTestListTestParser

public GTestListTestParser (String testRunName, 
                ITestInvocationListener listener)

为单个监听器创建 GTestListTestParser。

参数
testRunName String:要提供给 ITestInvocationListener.testRunStarted(String,int) 的测试运行名称

listener ITestInvocationListener:在测试执行时接收测试结果通知

GTestListTestParser

public GTestListTestParser (String testRunName, 
                ITestInvocationListener listener, 
                boolean shouldCollectDisabledTest)

为单个监听器创建 GTestListTestParser。

参数
testRunName String:要提供给 ITestInvocationListener.testRunStarted(String,int) 的测试运行名称

listener ITestInvocationListener:在测试执行时接收测试结果通知

shouldCollectDisabledTest boolean:是否收集已停用的测试

公共方法

done

public void done ()

终止进程。此方法在最后几行通过 processNewLines(String[]) 后调用。

getPrependFileName

public boolean getPrependFileName ()

返回
boolean

isCancelled

public boolean isCancelled ()

返回
boolean

processNewLines

public void processNewLines (String[] lines)

当远程进程收到新行时调用。

保证在将行提供给此方法时,这些行是完整的。

参数
lines String:包含新行的数组。

setPrependFileName

public void setPrependFileName (boolean prepend)

参数
prepend boolean