ISandbox
public
interface
ISandbox
com.android.tradefed.sandbox.ISandbox |
呼び出しの実行に使用できるサンドボックスを定義するインターフェース。
概要
パブリック メソッド | |
---|---|
abstract
String
|
createClasspath(File workingDir)
環境と |
abstract
IConfiguration
|
createThinLauncherConfig(String[] args, IKeyStoreClient keyStoreClient, IRunUtil runUtil, File globalConfig)
メイン実行から切断された特別なモード: 親に構成が存在しないと思われる場合は、シン ランチャーにフォールバックします。ここでは、現在知られている情報を使用してサンドボックスをセットアップし、作業ディレクトリを埋めて、バージョニングされたディレクトリに構成を完全に作成します。 |
abstract
File
|
getTradefedSandboxEnvironment(IInvocationContext context, IConfiguration nonVersionedConfig, String[] args)
コマンドライン引数に基づいて使用されるサンドボックス環境 TF を返します。 |
abstract
Exception
|
prepareEnvironment(IInvocationContext context, IConfiguration configuration, ITestInvocationListener listener)
サンドボックスが適切に実行されるように環境を準備します。 |
abstract
CommandResult
|
run(IConfiguration configuration, ITestLogger logger)
設定した環境でサンドボックスを実行します。 |
abstract
void
|
tearDown()
変更された可能性のある状態、ファイル、環境をクリーンアップします。 |
パブリック メソッド
createClasspath
public abstract String createClasspath (File workingDir)
環境と getTradefedSandboxEnvironment(com.android.tradefed.invoker.IInvocationContext, com.android.tradefed.config.IConfiguration, String[])
から返された作業ディレクトリに基づいてクラスパスを作成します。
パラメータ | |
---|---|
workingDir |
File : サンドボックスの現在の作業ディレクトリ。 |
戻り値 | |
---|---|
String |
使用するクラスパス。 |
例外 | |
---|---|
ConfigurationException |
createThinLauncherConfig
public abstract IConfiguration createThinLauncherConfig (String[] args, IKeyStoreClient keyStoreClient, IRunUtil runUtil, File globalConfig)
メイン実行から切断された特別なモード: 親に構成が存在しないと思われる場合は、シン ランチャーにフォールバックします。ここでは、現在知られている情報を使用してサンドボックスをセットアップし、作業ディレクトリを埋めて、バージョニングされたディレクトリに構成を完全に作成します。
パラメータ | |
---|---|
args |
String : 元のコマンドライン引数。 |
keyStoreClient |
IKeyStoreClient : 構成の作成に使用する現在のキーストア クライアント。 |
runUtil |
IRunUtil : ホストコマンドを実行する現在の IRunUtil 。 |
globalConfig |
File : TF のサブプロセスの実行に使用するグローバル構成。 |
戻り値 | |
---|---|
IConfiguration |
NON_VERSIONED オブジェクトの TF の構成 XML を指すファイル。シン ランチャー構成を作成できなかった場合は null を返します。 |
getTradefedSandboxEnvironment
public abstract File getTradefedSandboxEnvironment (IInvocationContext context, IConfiguration nonVersionedConfig, String[] args)
コマンドライン引数に基づいて、使用するサンドボックス環境の TF を返します。
パラメータ | |
---|---|
context |
IInvocationContext : 親の IInvocationContext 。 |
nonVersionedConfig |
IConfiguration : バージョニングされていないオブジェクトを表す IConfiguration 。 |
args |
String : コマンドライン引数。 |
戻り値 | |
---|---|
File |
TF サンドボックス環境の JAR を含む ERROR(/File) ディレクトリ。 |
prepareEnvironment
public abstract Exception prepareEnvironment (IInvocationContext context, IConfiguration configuration, ITestInvocationListener listener)
サンドボックスが適切に実行されるように環境を準備します。
パラメータ | |
---|---|
context |
IInvocationContext : 現在の呼び出し IInvocationContext 。 |
configuration |
IConfiguration : 実行するコマンドの IConfiguration 。 |
listener |
ITestInvocationListener : 最終結果をパイプする現在の呼び出し ITestInvocationListener 。 |
戻り値 | |
---|---|
Exception |
失敗を含む Exception 。成功した場合は null。 |
ホームラン
public abstract CommandResult run (IConfiguration configuration, ITestLogger logger)
設定した環境でサンドボックスを実行します。
パラメータ | |
---|---|
configuration |
IConfiguration : 実行するコマンドの IConfiguration 。 |
logger |
ITestLogger : ファイルをロギングできる ITestLogger 。 |
戻り値 | |
---|---|
CommandResult |
サンドボックス実行のステータスとログを含む CommandResult 。 |
tearDown
public abstract void tearDown ()
変更された可能性のある状態、ファイル、環境をクリーンアップします。