使用集合让一切井井有条 根据您的偏好保存内容并对其进行分类。

测试文件推送设置

public class TestFilePushSetup
extends BaseTargetPreparer implements IDiscoverDependencies

java.lang.Object
com.android.tradefed.targetprep.BaseTargetPreparer
com.android.tradefed.targetprep.TestFilePushSetup


将一个或多个文件/目录从ITargetPreparer IDeviceBuildInfo.getTestsDir()文件夹推送到设备上的 ITargetPreparer。

如果测试 zip 不存在或不包含所需的 apk,此准备程序将在备用目录中查找。搜索将按从指定的最后一个替代目录到第一个的顺序进行。

概括

公共构造函数

TestFilePushSetup ()

公共方法

reportDependencies ()
void setUp ( TestInformation testInfo)

受保护的方法

void addTestFileName (String fileName)

将文件添加到要推送的项目列表中

void clearTestFileName ()
getFailedToPushFiles ()

返回推送失败的文件集。

File getLocalPathForFilename ( IBuildInfo buildInfo, String fileName, ITestDevice device)

根据构建信息中的测试工件信息解析主机端路径。

getTestFileNames ()

检索要从测试 zip 推送到设备的文件列表

void setThrowIfNoFile (boolean throwIfNoFile)

公共构造函数

测试文件推送设置

public TestFilePushSetup ()

公共方法

报告依赖项

public  reportDependencies ()

退货

设置

public void setUp (TestInformation testInfo)

参数
testInfo TestInformation

投掷
BuildError
DeviceNotAvailableException
TargetSetupError

受保护的方法

添加测试文件名

protected void addTestFileName (String fileName)

将文件添加到要推送的项目列表中

清除测试文件名

protected void clearTestFileName ()

getFailedToPushFiles

protected  getFailedToPushFiles ()

返回推送失败的文件集。只能在 'throw-if-not-found' 为 false 时使用,否则第一次失败的推送将引发异常。

退货

getLocalPathForFilename

protected File getLocalPathForFilename (IBuildInfo buildInfo, 
                String fileName, 
                ITestDevice device)

根据构建信息中的测试工件信息解析主机端路径。

参数
buildInfo IBuildInfo : 构建工件信息

fileName String : 要推送的工件的文件名

device ITestDevice

退货
File一个ERROR(/File)表示主机上的物理文件/路径

投掷
TargetSetupError

获取测试文件名

protected  getTestFileNames ()

检索要从测试 zip 推送到设备的文件列表

退货

setThrowIfNoFile

protected void setThrowIfNoFile (boolean throwIfNoFile)

参数
throwIfNoFile boolean