Tradefedサンドボックス
public class TradefedSandbox
extends Object
implements ISandbox
java.lang.オブジェクト | |
↳ | com.android.tradefed.sandbox.TradefedSandbox |
Trade Federation の呼び出しを実行できるサンドボックス コンテナー。 TODO: オプションをサンドボックスに渡すことを許可します。
まとめ
田畑 | |
---|---|
public static final String | SANDBOX_ENABLED
|
パブリックコンストラクター | |
---|---|
TradefedSandbox () |
パブリックメソッド | |
---|---|
String | createClasspath (File workingDir) |
IConfiguration | createThinLauncherConfig (String[] args, IKeyStoreClient keyStoreClient, IRunUtil runUtil, File globalConfig) メイン実行から切断された特殊モード: 親に構成が存在しないように見える場合、シン ランチャーにフォールバックし、現在既知の情報でサンドボックスをセットアップし、作業ディレクトリを埋めて、バージョン管理されたディレクトリに構成を完全に作成しようとします。 。 |
File | getTradefedSandboxEnvironment ( IInvocationContext context, IConfiguration nonVersionedConfig, String[] args) コマンドライン引数に基づいて、使用されるサンドボックス環境 TF を返します。 |
Exception | prepareEnvironment ( IInvocationContext context, IConfiguration config, ITestInvocationListener listener) サンドボックスが適切に実行できるように環境を準備します。 |
CommandResult | run ( TestInformation info, IConfiguration config, ITestLogger logger) 設定した環境でサンドボックスを実行します。 |
void | tearDown () 変更された可能性のある状態、ファイル、または環境をクリーンアップします。 |
保護されたメソッド | |
---|---|
File | dumpGlobalConfig ( IConfiguration config, exclusionPatterns) dumpGlobalConfig ( IConfiguration config, exclusionPatterns) いくつかのオブジェクトからフィルタリングされたグローバル構成をダンプします。 |
String | getJava () |
Exception | prepareConfiguration ( IInvocationContext context, IConfiguration config, ITestInvocationListener listener) サブプロセスに渡され、コンテナーの実行を駆動する |
File | prepareContext ( IInvocationContext context, IConfiguration config) |
田畑
サンドボックス_有効
public static final String SANDBOX_ENABLED
パブリックコンストラクター
Tradefedサンドボックス
public TradefedSandbox ()
パブリックメソッド
クラスパスの作成
public String createClasspath (File workingDir)
getTradefedSandboxEnvironment(com.android.tradefed.invoker.IInvocationContext, com.android.tradefed.config.IConfiguration, String[])
によって返される環境と作業ディレクトリに基づいてクラスパスを作成します。
パラメーター | |
---|---|
workingDir | File : サンドボックスの現在の作業ディレクトリ。 |
戻り値 | |
---|---|
String | 使用するクラスパス。 |
投げる | |
---|---|
ConfigurationException |
createThinLauncherConfig
public 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 を返します。 |
getTradefedサンドボックス環境
public File getTradefedSandboxEnvironment (IInvocationContext context, IConfiguration nonVersionedConfig, String[] args)
コマンドライン引数に基づいて、使用されるサンドボックス環境 TF を返します。
パラメーター | |
---|---|
context | IInvocationContext : 親のIInvocationContext 。 |
nonVersionedConfig | IConfiguration : バージョン管理されていないオブジェクトを表すIConfiguration 。 |
args | String : コマンドライン引数。 |
戻り値 | |
---|---|
File | TF サンドボックス環境の jar を含むERROR(/File) ディレクトリ。 |
環境を準備する
public Exception prepareEnvironment (IInvocationContext context, IConfiguration config, ITestInvocationListener listener)
サンドボックスが適切に実行できるように環境を準備します。
パラメーター | |
---|---|
context | IInvocationContext : 現在の呼び出しIInvocationContext 。 |
config | IConfiguration : 実行するコマンドのIConfiguration 。 |
listener | ITestInvocationListener : 最終結果がパイプされる現在の呼び出しITestInvocationListener 。 |
戻り値 | |
---|---|
Exception | 失敗を含むException 。成功した場合は Null。 |
走る
public CommandResult run (TestInformation info, IConfiguration config, ITestLogger logger)
設定した環境でサンドボックスを実行します。
パラメーター | |
---|---|
info | TestInformation : 呼び出しを説明するTestInformation |
config | IConfiguration : 実行するコマンドのIConfiguration 。 |
logger | ITestLogger : ファイルのログを記録できるITestLogger 。 |
戻り値 | |
---|---|
CommandResult | サンドボックスの実行ステータスとログを含むCommandResult 。 |
取り壊す
public void tearDown ()
変更された可能性のある状態、ファイル、または環境をクリーンアップします。
保護されたメソッド
ダンプグローバル構成
protected File dumpGlobalConfig (IConfiguration config,exclusionPatterns)
いくつかのオブジェクトからフィルタリングされたグローバル構成をダンプします。
パラメーター | |
---|---|
config | IConfiguration |
exclusionPatterns |
戻り値 | |
---|---|
File |
投げる | |
---|---|
ConfigurationException |
getJava
protected String getJava ()
戻り値 | |
---|---|
String |
構成の準備
protected Exception prepareConfiguration (IInvocationContext context, IConfiguration config, ITestInvocationListener listener)
サブプロセスに渡され、コンテナーの実行を駆動するIConfiguration
を準備します。
パラメーター | |
---|---|
context | IInvocationContext : 現在のIInvocationContext 。 |
config | IConfiguration : 準備するIConfiguration 。 |
listener | ITestInvocationListener : 現在の呼び出しITestInvocationListener 。 |
戻り値 | |
---|---|
Exception | 何か問題が発生した場合は例外、それ以外の場合は null。 |
コンテキストの準備
protected File prepareContext (IInvocationContext context, IConfiguration config)
IInvocationContext
を準備してシリアル化します。
パラメーター | |
---|---|
context | IInvocationContext : 準備されるIInvocationContext 。 |
config | IConfiguration : サンドボックスのIConfiguration 。 |
戻り値 | |
---|---|
File | シリアル化されたIInvocationContext 。 |
投げる | |
---|---|
| IO例外 |
Tradefedサンドボックス
public class TradefedSandbox
extends Object
implements ISandbox
java.lang.オブジェクト | |
↳ | com.android.tradefed.sandbox.TradefedSandbox |
Trade Federation の呼び出しを実行できるサンドボックス コンテナー。 TODO: オプションをサンドボックスに渡すことを許可します。
まとめ
田畑 | |
---|---|
public static final String | SANDBOX_ENABLED
|
パブリックコンストラクター | |
---|---|
TradefedSandbox () |
パブリックメソッド | |
---|---|
String | createClasspath (File workingDir) |
IConfiguration | createThinLauncherConfig (String[] args, IKeyStoreClient keyStoreClient, IRunUtil runUtil, File globalConfig) メイン実行から切断された特殊モード: 親に構成が存在しないように見える場合、シン ランチャーにフォールバックし、現在既知の情報でサンドボックスをセットアップし、作業ディレクトリを埋めて、バージョン管理されたディレクトリに構成を完全に作成しようとします。 。 |
File | getTradefedSandboxEnvironment ( IInvocationContext context, IConfiguration nonVersionedConfig, String[] args) コマンドライン引数に基づいて、使用されるサンドボックス環境 TF を返します。 |
Exception | prepareEnvironment ( IInvocationContext context, IConfiguration config, ITestInvocationListener listener) サンドボックスが適切に実行できるように環境を準備します。 |
CommandResult | run ( TestInformation info, IConfiguration config, ITestLogger logger) 設定した環境でサンドボックスを実行します。 |
void | tearDown () 変更された可能性のある状態、ファイル、または環境をクリーンアップします。 |
保護されたメソッド | |
---|---|
File | dumpGlobalConfig ( IConfiguration config, exclusionPatterns) dumpGlobalConfig ( IConfiguration config, exclusionPatterns) いくつかのオブジェクトからフィルタリングされたグローバル構成をダンプします。 |
String | getJava () |
Exception | prepareConfiguration ( IInvocationContext context, IConfiguration config, ITestInvocationListener listener) サブプロセスに渡され、コンテナーの実行を駆動する |
File | prepareContext ( IInvocationContext context, IConfiguration config) |
田畑
サンドボックス_有効
public static final String SANDBOX_ENABLED
パブリックコンストラクター
Tradefedサンドボックス
public TradefedSandbox ()
パブリックメソッド
クラスパスの作成
public String createClasspath (File workingDir)
getTradefedSandboxEnvironment(com.android.tradefed.invoker.IInvocationContext, com.android.tradefed.config.IConfiguration, String[])
によって返される環境と作業ディレクトリに基づいてクラスパスを作成します。
パラメーター | |
---|---|
workingDir | File : サンドボックスの現在の作業ディレクトリ。 |
戻り値 | |
---|---|
String | 使用するクラスパス。 |
投げる | |
---|---|
ConfigurationException |
createThinLauncherConfig
public 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 を返します。 |
getTradefedサンドボックス環境
public File getTradefedSandboxEnvironment (IInvocationContext context, IConfiguration nonVersionedConfig, String[] args)
コマンドライン引数に基づいて、使用されるサンドボックス環境 TF を返します。
パラメーター | |
---|---|
context | IInvocationContext : 親のIInvocationContext 。 |
nonVersionedConfig | IConfiguration : バージョン管理されていないオブジェクトを表すIConfiguration 。 |
args | String : コマンドライン引数。 |
戻り値 | |
---|---|
File | TF サンドボックス環境の jar を含むERROR(/File) ディレクトリ。 |
環境を準備する
public Exception prepareEnvironment (IInvocationContext context, IConfiguration config, ITestInvocationListener listener)
サンドボックスが適切に実行できるように環境を準備します。
パラメーター | |
---|---|
context | IInvocationContext : 現在の呼び出しIInvocationContext 。 |
config | IConfiguration : 実行するコマンドのIConfiguration 。 |
listener | ITestInvocationListener : 最終結果がパイプされる現在の呼び出しITestInvocationListener 。 |
戻り値 | |
---|---|
Exception | 失敗を含むException 。成功した場合は Null。 |
走る
public CommandResult run (TestInformation info, IConfiguration config, ITestLogger logger)
設定した環境でサンドボックスを実行します。
パラメーター | |
---|---|
info | TestInformation : 呼び出しを説明するTestInformation |
config | IConfiguration : 実行するコマンドのIConfiguration 。 |
logger | ITestLogger : ファイルのログを記録できるITestLogger 。 |
戻り値 | |
---|---|
CommandResult | サンドボックスの実行ステータスとログを含むCommandResult 。 |
取り壊す
public void tearDown ()
変更された可能性のある状態、ファイル、または環境をクリーンアップします。
保護されたメソッド
ダンプグローバル構成
protected File dumpGlobalConfig (IConfiguration config,exclusionPatterns)
いくつかのオブジェクトからフィルタリングされたグローバル構成をダンプします。
パラメーター | |
---|---|
config | IConfiguration |
exclusionPatterns |
戻り値 | |
---|---|
File |
投げる | |
---|---|
ConfigurationException |
getJava
protected String getJava ()
戻り値 | |
---|---|
String |
構成の準備
protected Exception prepareConfiguration (IInvocationContext context, IConfiguration config, ITestInvocationListener listener)
サブプロセスに渡され、コンテナーの実行を駆動するIConfiguration
を準備します。
パラメーター | |
---|---|
context | IInvocationContext : 現在のIInvocationContext 。 |
config | IConfiguration : 準備するIConfiguration 。 |
listener | ITestInvocationListener : 現在の呼び出しITestInvocationListener 。 |
戻り値 | |
---|---|
Exception | 何か問題が発生した場合は例外、それ以外の場合は null。 |
コンテキストの準備
protected File prepareContext (IInvocationContext context, IConfiguration config)
IInvocationContext
を準備してシリアル化します。
パラメーター | |
---|---|
context | IInvocationContext : 準備されるIInvocationContext 。 |
config | IConfiguration : サンドボックスのIConfiguration 。 |
戻り値 | |
---|---|
File | シリアル化されたIInvocationContext 。 |
投げる | |
---|---|
| IO例外 |