SuiteApkInstaller

public class SuiteApkInstaller
extends TestAppInstallSetup

java.lang.Object
   ↳ com.android.tradefed.targetprep.BaseTargetPreparer
     ↳ com.android.tradefed.targetprep.TestAppInstallSetup
       ↳ com.android.tradefed.targetprep.suite.SuiteApkInstaller


Installs specified APKs for Suite configuration: either from $ANDROID_TARGET_OUT_TESTCASES variable or the ROOT_DIR in build info.

Summary

Public constructors

SuiteApkInstaller()

Protected methods

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

Resolve the actual apk path based on testing artifact information inside build info.

File getTestsDir(IBuildInfo buildInfo)

Try to find a path for the base root tests directory.

Public constructors

SuiteApkInstaller

public SuiteApkInstaller ()

Protected methods

getLocalPathForFilename

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

Resolve the actual apk path based on testing artifact information inside build info.

Parameters
buildInfo IBuildInfo: build artifact information

apkFileName String: filename of the apk to install

device ITestDevice: the ITestDevice being prepared

Returns
File a File representing the physical apk file on host or null if the file does not exist.

Throws
TargetSetupError

getTestsDir

protected File getTestsDir (IBuildInfo buildInfo)

Try to find a path for the base root tests directory.

Parameters
buildInfo IBuildInfo: the IBuildInfo describing the build.

Returns
File a File pointing to the directory of the root tests dir.

Throws
FileNotFoundException if no root dir is defined.