TestFilePushSetup
public
class
TestFilePushSetup
extends BaseTargetPreparer
implements
IDiscoverDependencies
| java.lang.Object | ||
| ↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
| ↳ | com.android.tradefed.targetprep.TestFilePushSetup | |
一个 ITargetPreparer,用于将一个或多个文件/目录从 IDeviceBuildInfo.getTestsDir() 文件夹推送到设备上。
如果测试 zip 不存在或不 包含所需的 apk,此准备器将查找备用目录。搜索将按从最后一个备用目录到 第一个的顺序进行。
摘要
公共构造函数 | |
|---|---|
TestFilePushSetup()
|
|
公共方法 | |
|---|---|
Set<String>
|
reportDependencies()
|
void
|
setUp(TestInformation testInfo)
|
受保护的方法 | |
|---|---|
void
|
addTestFileName(String fileName)
将文件添加到要推送的项的列表中 |
void
|
clearTestFileName()
|
Set<String>
|
getFailedToPushFiles()
返回推送失败的文件集。 |
File
|
getLocalPathForFilename(IBuildInfo buildInfo, String fileName, ITestDevice device)
根据 build 信息中的测试工件信息解析主机端路径。 |
List<String>
|
getTestFileNames()
检索要从测试 zip 推送到设备的文件列表 |
void
|
setThrowIfNoFile(boolean throwIfNoFile)
|
公共构造函数
TestFilePushSetup
public TestFilePushSetup ()
公共方法
reportDependencies
public Set<String> reportDependencies ()
| 返回 | |
|---|---|
Set<String> |
|
setUp
public void setUp (TestInformation testInfo)
| 参数 | |
|---|---|
testInfo |
TestInformation |
| 抛出 | |
|---|---|
BuildError |
|
DeviceNotAvailableException |
|
TargetSetupError |
|
受保护的方法
addTestFileName
protected void addTestFileName (String fileName)
将文件添加到要推送的项的列表中
clearTestFileName
protected void clearTestFileName ()
getFailedToPushFiles
protected Set<String> getFailedToPushFiles ()
返回推送失败的文件集。只有当“throw-if-not-found” 为 false 时才能使用,否则第一次推送失败将抛出异常。
| 返回 | |
|---|---|
Set<String> |
|
getLocalPathForFilename
protected File getLocalPathForFilename (IBuildInfo buildInfo, String fileName, ITestDevice device)
根据 build 信息中的测试工件信息解析主机端路径。
| 参数 | |
|---|---|
buildInfo |
IBuildInfo:build 工件信息 |
fileName |
String:要推送的工件的文件名 |
device |
ITestDevice |
| 返回 | |
|---|---|
File |
一个 File,表示主机上的物理文件/路径 |
| 抛出 | |
|---|---|
TargetSetupError |
|
getTestFileNames
protected List<String> getTestFileNames ()
检索要从测试 zip 推送到设备的文件列表
| 返回 | |
|---|---|
List<String> |
|
setThrowIfNoFile
protected void setThrowIfNoFile (boolean throwIfNoFile)
| 参数 | |
|---|---|
throwIfNoFile |
boolean |