TestFilePushSetup
public
class
TestFilePushSetup
extends BaseTargetPreparer
implements
IDiscoverDependencies
| java.lang.Object | ||
| ↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
| ↳ | com.android.tradefed.targetprep.TestFilePushSetup | |
用于将一个或多个文件/目录从 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)
根据 build 信息中的测试工件信息解析主机端路径。 |
|
getTestFileNames()
检索要从测试 ZIP 文件推送到设备的文件列表 |
void
|
setThrowIfNoFile(boolean throwIfNoFile)
|
公共构造函数
TestFilePushSetup
public TestFilePushSetup ()
公共方法
reportDependencies
publicreportDependencies ()
| 返回 | |
|---|---|
|
|
setUp
public void setUp (TestInformation testInfo)
| 参数 | |
|---|---|
testInfo |
TestInformation |
| 抛出 | |
|---|---|
BuildError |
|
DeviceNotAvailableException |
|
TargetSetupError |
|
受保护的方法
addTestFileName
protected void addTestFileName (String fileName)
将文件添加到要推送的项列表
clearTestFileName
protected void clearTestFileName ()
getFailedToPushFiles
protectedgetFailedToPushFiles ()
返回推送失败的一组文件。仅当“throw-if-not-found”为 false 时才能使用,否则第一次推送失败时会抛出异常。
| 返回 | |
|---|---|
|
|
getLocalPathForFilename
protected File getLocalPathForFilename (IBuildInfo buildInfo, String fileName, ITestDevice device)
根据 build 信息中的测试工件信息解析主机端路径。
| 参数 | |
|---|---|
buildInfo |
IBuildInfo:build 工件信息 |
fileName |
String:要推送的工件的文件名 |
device |
ITestDevice |
| 返回 | |
|---|---|
File |
一个 ERROR(/File),表示主机上的实际文件/路径 |
| 抛出 | |
|---|---|
TargetSetupError |
|
getTestFileNames
protectedgetTestFileNames ()
检索要从测试 ZIP 文件推送到设备的文件列表
| 返回 | |
|---|---|
|
|
setThrowIfNoFile
protected void setThrowIfNoFile (boolean throwIfNoFile)
| 参数 | |
|---|---|
throwIfNoFile |
boolean |