ITestsZipInstaller

public interface ITestsZipInstaller

com.android.tradefed.targetprep.ITestsZipInstaller


Installs tests from a tests zip file (as outputted by the build system) on a device.

Summary

Public methods

abstract void deleteData(ITestDevice device)

Removes all of the files/directories from /data on the specified device, with the exception of those excluded by the skip list.

abstract void pushTestsZipOntoData(ITestDevice device, IDeviceBuildInfo deviceBuild)

Pushes the contents of the tests.zip file onto the device's data partition.

abstract void setDataWipeSkipList( skipList)

Sets the list of paths under /data to avoid clearing.

abstract void setDataWipeSkipList(String... skipList)

Sets the list of paths under /data to avoid clearing.

Public methods

deleteData

public abstract void deleteData (ITestDevice device)

Removes all of the files/directories from /data on the specified device, with the exception of those excluded by the skip list.

Implementation will stop the runtime on device. It is highly recommended to reboot the device upon completion of this method.

Parameters
device ITestDevice: The ITestDevice to act on

Throws
DeviceNotAvailableException
TargetSetupError

pushTestsZipOntoData

public abstract void pushTestsZipOntoData (ITestDevice device, 
                IDeviceBuildInfo deviceBuild)

Pushes the contents of the tests.zip file onto the device's data partition.

Parameters
device ITestDevice: the ITestDevice to flash, assumed to be in adb mode.

deviceBuild IDeviceBuildInfo: the IDeviceBuildInfo that contains the tests zip to flash

Throws
com.android.tradefed.device.DeviceNotAvailableException
com.android.tradefed.targetprep.TargetSetupError
DeviceNotAvailableException
TargetSetupError

setDataWipeSkipList

public abstract void setDataWipeSkipList ( skipList)

Sets the list of paths under /data to avoid clearing.

Parameters
skipList : the list of directories to skip.

Note that the granularity of the skip list is direct children of /data.

setDataWipeSkipList

public abstract void setDataWipeSkipList (String... skipList)

Sets the list of paths under /data to avoid clearing.

Parameters
skipList String: the list of directories to skip.

Note that the granularity of the skip list is direct children of /data.