public class

DefaultTestsZipInstaller

extends Object
implements ITestsZipInstaller
java.lang.Object
   ↳ com.android.tradefed.targetprep.DefaultTestsZipInstaller

Class Overview

A default implementation of tests zip installer.

Summary

Public Constructors
DefaultTestsZipInstaller()
Default constructor.
DefaultTestsZipInstaller(Collection<String> skipList)
This convenience constructor allows the caller to set the skip list directly, rather than needing to call setDataWipeSkipList(String...) separately.
DefaultTestsZipInstaller(String... skipList)
This convenience constructor allows the caller to set the skip list directly, rather than needing to call setDataWipeSkipList(String...) separately.
Public Methods
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.
Set<String> getDataWipeSkipList()
Get the directory of directories to wipe, used for testing only.
void pushTestsZipOntoData(ITestDevice device, IDeviceBuildInfo deviceBuild)
Pushes the contents of the tests.zip file onto the device's data partition.

This implementation will reboot the device into userland before proceeding.

void setDataWipeSkipList(Collection<String> skipList)
Sets the list of paths under /data to avoid clearing.
void setDataWipeSkipList(String... skipList)
Sets the list of paths under /data to avoid clearing.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.android.tradefed.targetprep.ITestsZipInstaller

Public Constructors

public DefaultTestsZipInstaller ()

Default constructor.

public DefaultTestsZipInstaller (Collection<String> skipList)

This convenience constructor allows the caller to set the skip list directly, rather than needing to call setDataWipeSkipList(String...) separately.

Parameters
skipList The collection of paths under /data to keep when clearing the filesystem @see #setDataWipeSkipList

public DefaultTestsZipInstaller (String... skipList)

This convenience constructor allows the caller to set the skip list directly, rather than needing to call setDataWipeSkipList(String...) separately.

Parameters
skipList The collection of paths under /data to keep when clearing the filesystem @see #setDataWipeSkipList

Public Methods

public 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 The ITestDevice to act on

public Set<String> getDataWipeSkipList ()

Get the directory of directories to wipe, used for testing only.

Returns
  • the set of directories to skip when wiping a directory

public void pushTestsZipOntoData (ITestDevice device, IDeviceBuildInfo deviceBuild)

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

This implementation will reboot the device into userland before proceeding. It will also stop the Android runtime and leave it down upon return

Parameters
device the ITestDevice to flash, assumed to be in adb mode.
deviceBuild the IDeviceBuildInfo that contains the tests zip to flash

public void setDataWipeSkipList (Collection<String> 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.

public void setDataWipeSkipList (String... 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.