測試文件推送設置
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) 根據構建信息中的測試工件信息解析主機端路徑。 |
getTestFileNames () 檢索要從測試 zip 推送到設備的文件列表 | |
void | setThrowIfNoFile (boolean throwIfNoFile) |
公共構造函數
測試文件推送設置
public TestFilePushSetup ()
公共方法
報告依賴關係
publicreportDependencies ()
退貨 | |
---|---|
設置
public void setUp (TestInformation testInfo)
參數 | |
---|---|
testInfo | TestInformation |
投擲 | |
---|---|
BuildError | |
DeviceNotAvailableException | |
TargetSetupError |
受保護的方法
添加測試文件名
protected void addTestFileName (String fileName)
將文件添加到要推送的項目列表中
清除測試文件名
protected void clearTestFileName ()
getFailedToPushFiles
protectedgetFailedToPushFiles ()
返回推送失敗的文件集。只能在 '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 |
獲取測試文件名
protectedgetTestFileNames ()
檢索要從測試 zip 推送到設備的文件列表
退貨 | |
---|---|
設置ThrowIfNoFile
protected void setThrowIfNoFile (boolean throwIfNoFile)
參數 | |
---|---|
throwIfNoFile | boolean |