SandboxConfigUtil

public class SandboxConfigUtil
extends Object

java.lang.Object
   ↳ com.android.tradefed.sandbox.SandboxConfigUtil


A utility class for managing IConfiguration when doing sandboxing.

Summary

Public constructors

SandboxConfigUtil()

Public methods

static File dumpConfigForVersion(File rootDir, IRunUtil runUtil, String[] args, SandboxConfigDump.DumpCmd dump, File globalConfig)

Create a subprocess based on the Tf jars from any version, and dump the xml IConfiguration based on the command line args.

static File dumpConfigForVersion(String classpath, IRunUtil runUtil, String[] args, SandboxConfigDump.DumpCmd dump, File globalConfig)

Create a subprocess based on the Tf jars from any version, and dump the xml IConfiguration based on the command line args.

static File dumpFilteredGlobalConfig()

Create a global config with only the keystore to make it available in subprocess.

Public constructors

SandboxConfigUtil

public SandboxConfigUtil ()

Public methods

dumpConfigForVersion

public static File dumpConfigForVersion (File rootDir, 
                IRunUtil runUtil, 
                String[] args, 
                SandboxConfigDump.DumpCmd dump, 
                File globalConfig)

Create a subprocess based on the Tf jars from any version, and dump the xml IConfiguration based on the command line args.

Parameters
rootDir File: the directory containing all the jars from TF.

runUtil IRunUtil: the IRunUtil to use to run the command.

args String: the command line args.

dump SandboxConfigDump.DumpCmd: the SandboxConfigDump.DumpCmd driving some of the outputs.

globalConfig File: the file describing the global configuration to be used.

Returns
File A File containing the xml dump from the command line.

Throws
ConfigurationException if the dump is not successful.
IOException

dumpConfigForVersion

public static File dumpConfigForVersion (String classpath, 
                IRunUtil runUtil, 
                String[] args, 
                SandboxConfigDump.DumpCmd dump, 
                File globalConfig)

Create a subprocess based on the Tf jars from any version, and dump the xml IConfiguration based on the command line args.

Parameters
classpath String: the classpath to use to run the sandbox.

runUtil IRunUtil: the IRunUtil to use to run the command.

args String: the command line args.

dump SandboxConfigDump.DumpCmd: the SandboxConfigDump.DumpCmd driving some of the outputs.

globalConfig File: the file describing the global configuration to be used.

Returns
File A File containing the xml dump from the command line.

Throws
SandboxConfigurationException if the dump is not successful.
IOException

dumpFilteredGlobalConfig

public static File dumpFilteredGlobalConfig ()

Create a global config with only the keystore to make it available in subprocess.

Returns
File

Throws
IOException