PythonVirtualenvPreparer

public class PythonVirtualenvPreparer
extends Object implements ITargetPreparer

java.lang.Object
   ↳ com.android.tradefed.targetprep.PythonVirtualenvPreparer


Sets up a Python virtualenv on the host and installs packages. To activate it, the working directory is changed to the root of the virtualenv.

Summary

Constants

String PYTHONPATH

Fields

String mPip

IRunUtil mRunUtil

Public constructors

PythonVirtualenvPreparer()

Public methods

void setUp(ITestDevice device, IBuildInfo buildInfo)

Perform the target setup for testing.

Protected methods

void addDepModule(String module)
void installDeps(IBuildInfo buildInfo, ITestDevice device)
void setRequirementsFile(File f)
void startVirtualenv(IBuildInfo buildInfo, ITestDevice device)

Constants

PYTHONPATH

String PYTHONPATH

Constant Value: "PYTHONPATH"

Fields

mPip

String mPip

mRunUtil

IRunUtil mRunUtil

Public constructors

PythonVirtualenvPreparer

PythonVirtualenvPreparer ()

Public methods

setUp

void setUp (ITestDevice device, 
                IBuildInfo buildInfo)

Perform the target setup for testing.

Parameters
device ITestDevice: the ITestDevice to prepare.
buildInfo IBuildInfo: data about the build under test.
Throws
TargetSetupError
BuildError
DeviceNotAvailableException

Protected methods

addDepModule

void addDepModule (String module)

Parameters
module String

installDeps

void installDeps (IBuildInfo buildInfo, 
                ITestDevice device)

Parameters
buildInfo IBuildInfo
device ITestDevice
Throws
TargetSetupError

setRequirementsFile

void setRequirementsFile (File f)

Parameters
f File

startVirtualenv

void startVirtualenv (IBuildInfo buildInfo, 
                ITestDevice device)

Parameters
buildInfo IBuildInfo
device ITestDevice
Throws
TargetSetupError