TestFilePushSetup
public class TestFilePushSetup
extends BaseTargetPreparer
java.lang.Object | ||
↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
↳ | com.android.tradefed.targetprep.TestFilePushSetup |
一种ITargetPreparer
, IDeviceBuildInfo#getTestsDir()
文件夹中的一个或多个文件/目录推送到设备上。
如果测试zip不存在或不包含必需的apk,则此准备器将查找备用目录。搜索将从指定的最后一个替代目录到第一个替代目录。
概要
公共建设者 | |
---|---|
TestFilePushSetup () |
公开方法 | |
---|---|
void | setUp ( ITestDevice device, IBuildInfo buildInfo)
|
受保护的方法 | |
---|---|
void | addTestFileName (String fileName) 将文件添加到要推送的项目列表中 |
void | clearTestFileName () |
getFailedToPushFiles () 返回未能推送的文件集。 | |
File | getLocalPathForFilename ( IBuildInfo buildInfo, String fileName, ITestDevice device) 根据构建信息中的测试工件信息来解析主机方路径。 |
getTestFileNames () 检索要从测试zip推送到设备的文件列表 | |
void | setAltDir (File altDir) 设置备用目录。 |
void | setAltDirBehavior ( AltDirBehavior behavior) 设置备用目录搜索行为。 |
void | setThrowIfNoFile (boolean throwIfNoFile) |
公共建设者
TestFilePushSetup
public TestFilePushSetup ()
公开方法
建立
public void setUp (ITestDevice device, IBuildInfo buildInfo)
参量 | |
---|---|
device | ITestDevice |
buildInfo | IBuildInfo |
投掷 | |
---|---|
BuildError | |
DeviceNotAvailableException | |
TargetSetupError |
受保护的方法
addTestFileName
protected void addTestFileName (String fileName)
将文件添加到要推送的项目列表中
clearTestFileName
protected void clearTestFileName ()
getFailedToPushFiles
protectedgetFailedToPushFiles ()
返回未能推送的文件集。仅当“ throw-if-not-found”为假时才可以使用,否则第一次失败的推送将引发异常。
退货 | |
---|---|
getLocalPathForFilename
protected File getLocalPathForFilename (IBuildInfo buildInfo, String fileName, ITestDevice device)
根据构建信息中的测试工件信息来解析主机方路径。
参量 | |
---|---|
buildInfo | IBuildInfo :构建工件信息 |
fileName | String :要推送的工件的文件名 |
device | ITestDevice |
退货 | |
---|---|
File | 代表主机上物理文件/路径的ERROR(/File) |
投掷 | |
---|---|
TargetSetupError |
getTestFileNames
protectedgetTestFileNames ()
检索要从测试zip推送到设备的文件列表
退货 | |
---|---|
setAltDir
protected void setAltDir (File altDir)
设置备用目录。暴露于测试。
参量 | |
---|---|
altDir | File |
setAltDirBehavior
protected void setAltDirBehavior (AltDirBehavior behavior)
设置备用目录搜索行为。暴露于测试。
参量 | |
---|---|
behavior | AltDirBehavior |
setThrowIfNoFile
protected void setThrowIfNoFile (boolean throwIfNoFile)
参量 | |
---|---|
throwIfNoFile | boolean |