TestEnvironment
  public
  
  
  
  class
  TestEnvironment
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | com.android.tradefed.cluster.TestEnvironment | 
A class to model a TestEnvironment message returned by TFC API.
Summary
| Public constructors | |
|---|---|
| 
      TestEnvironment()
       | |
| Public methods | |
|---|---|
| 
        
        
        
        
        
        void | 
      addEnvVar(String name, String value)
      Adds an environment variable. | 
| 
        
        
        
        
        
        void | 
      addExtraContextFile(String path)
      Adds a file path to append to the context file. | 
| 
        
        
        
        
        
        void | 
      addJavaProperty(String name, String value)
      Adds a java property. | 
| 
        
        
        
        
        
        void | 
      addJvmOption(String s)
      Adds a JVM option. | 
| 
        
        
        
        
        
        void | 
      addOutputFilePattern(String s)
      Adds an output file pattern. | 
| 
        
        
        
        
        
        void | 
      addSetupScripts(String s)
      Adds a setup script command. | 
| 
        
        
        static
        
        
        TestEnvironment | 
      fromJson(JSONObject json)
       | 
| 
        
        
        
        
        
        String | 
      getContextFilePattern()
       | 
| 
        
        
        
        
        
         | 
      getEnvVars()
      Returns a  | 
| 
        
        
        
        
        
         | 
      getExtraContextFiles()
       | 
| 
        
        
        
        
        
        long | 
      getInvocationTimeout()
       | 
| 
        
        
        
        
        
         | 
      getJavaProperties()
      Returns a  | 
| 
        
        
        
        
        
         | 
      getJvmOptions()
      Returns a list of JVM options. | 
| 
        
        
        
        
        
        String | 
      getLogLevel()
       | 
| 
        
        
        
        
        
         | 
      getOutputFilePatterns()
      Returns a list of output file patterns. | 
| 
        
        
        
        
        
        String | 
      getOutputFileUploadUrl()
      Returns an output file upload URL. | 
| 
        
        
        
        
        
        long | 
      getOutputIdleTimeout()
       | 
| 
        
        
        
        
        
        String | 
      getRetryCommandLine()
       | 
| 
        
        
        
        
        
         | 
      getSetupScripts()
      Returns a list of setup script commands. | 
| 
        
        
        
        
        
         | 
      getTradefedConfigObjects()
       | 
| 
        
        
        
        
        
        void | 
      setInvocationTimeout(long value)
       | 
| 
        
        
        
        
        
        void | 
      setOutputFileUploadUrl(String s)
      Sets an output file upload URL. | 
| 
        
        
        
        
        
        void | 
      setOutputIdleTimeout(long outputIdleTimeout)
       | 
| 
        
        
        
        
        
        void | 
      setUseParallelSetup(boolean f)
       | 
| 
        
        
        
        
        
        void | 
      setUseSubprocessReporting(boolean f)
       | 
| 
        
        
        
        
        
        boolean | 
      useParallelSetup()
      Returns whether to use parallel setup. | 
| 
        
        
        
        
        
        boolean | 
      useSubprocessReporting()
      Returns whether to use subprocess reporting. | 
Public constructors
TestEnvironment
public TestEnvironment ()
Public methods
addEnvVar
public void addEnvVar (String name, 
                String value)Adds an environment variable.
| Parameters | |
|---|---|
| name | String: a variable name. | 
| value | String: a variable value. | 
addExtraContextFile
public void addExtraContextFile (String path)
Adds a file path to append to the context file.
| Parameters | |
|---|---|
| path | String | 
addJavaProperty
public void addJavaProperty (String name, 
                String value)Adds a java property.
| Parameters | |
|---|---|
| name | String: a property name. | 
| value | String: a property value. | 
addJvmOption
public void addJvmOption (String s)
Adds a JVM option.
| Parameters | |
|---|---|
| s | String: a JVM option. | 
addOutputFilePattern
public void addOutputFilePattern (String s)
Adds an output file pattern.
| Parameters | |
|---|---|
| s | String: a file pattern. | 
addSetupScripts
public void addSetupScripts (String s)
Adds a setup script command.
| Parameters | |
|---|---|
| s | String: a setup script command. | 
fromJson
public static TestEnvironment fromJson (JSONObject json)
| Parameters | |
|---|---|
| json | JSONObject | 
| Returns | |
|---|---|
| TestEnvironment | |
| Throws | |
|---|---|
| JSONException | |
getContextFilePattern
public String getContextFilePattern ()
| Returns | |
|---|---|
| String | |
getEnvVars
publicgetEnvVars () 
Returns a ERROR(/Map) object containing all env vars.
| Returns | |
|---|---|
|  | unmodifiable map of all env vars. | 
getExtraContextFiles
publicgetExtraContextFiles () 
| Returns | |
|---|---|
|  | list of additional file paths to append to context file | 
getInvocationTimeout
public long getInvocationTimeout ()
| Returns | |
|---|---|
| long | maximum millis to wait for an invocation | 
getJavaProperties
publicgetJavaProperties () 
Returns a ERROR(/Map) object containing all Java properties.
| Returns | |
|---|---|
|  | unmodifiable map of all runner properties. | 
getJvmOptions
publicgetJvmOptions () 
Returns a list of JVM options.
| Returns | |
|---|---|
|  | unmodifiable list of options | 
getLogLevel
public String getLogLevel ()
| Returns | |
|---|---|
| String | |
getOutputFilePatterns
publicgetOutputFilePatterns () 
Returns a list of output file patterns.
| Returns | |
|---|---|
|  | unmodifiable list of file patterns. | 
getOutputFileUploadUrl
public String getOutputFileUploadUrl ()
Returns an output file upload URL.
| Returns | |
|---|---|
| String | a URL. | 
getOutputIdleTimeout
public long getOutputIdleTimeout ()
| Returns | |
|---|---|
| long | maximum millis to wait for an idle subprocess | 
getRetryCommandLine
public String getRetryCommandLine ()
| Returns | |
|---|---|
| String | |
getSetupScripts
publicgetSetupScripts () 
Returns a list of setup script commands.
| Returns | |
|---|---|
|  | unmodifiable list of commands | 
getTradefedConfigObjects
publicgetTradefedConfigObjects () 
| Returns | |
|---|---|
|  | |
setInvocationTimeout
public void setInvocationTimeout (long value)
| Parameters | |
|---|---|
| value | long | 
setOutputFileUploadUrl
public void setOutputFileUploadUrl (String s)
Sets an output file upload URL.
| Parameters | |
|---|---|
| s | String: a URL. | 
setOutputIdleTimeout
public void setOutputIdleTimeout (long outputIdleTimeout)
| Parameters | |
|---|---|
| outputIdleTimeout | long | 
setUseParallelSetup
public void setUseParallelSetup (boolean f)
| Parameters | |
|---|---|
| f | boolean | 
setUseSubprocessReporting
public void setUseSubprocessReporting (boolean f)
| Parameters | |
|---|---|
| f | boolean | 
useParallelSetup
public boolean useParallelSetup ()
Returns whether to use parallel setup.
| Returns | |
|---|---|
| boolean | a boolean. | 
useSubprocessReporting
public boolean useSubprocessReporting ()
Returns whether to use subprocess reporting.
| Returns | |
|---|---|
| boolean | a boolean. | 
