Iサンドボックス
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 ( TestInformation info, IConfiguration configuration, ITestLogger logger) 設定した環境でサンドボックスを実行します。 |
abstract void | tearDown () 変更された可能性のある状態、ファイル、または環境をクリーンアップします。 |
パブリックメソッド
クラスパスの作成
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 を返します。 |
getTradefedサンドボックス環境
public abstract File getTradefedSandboxEnvironment (IInvocationContext context, IConfiguration nonVersionedConfig, String[] args)
コマンドライン引数に基づいて、使用されるサンドボックス環境 TF を返します。
パラメーター | |
---|---|
context | IInvocationContext : 親のIInvocationContext 。 |
nonVersionedConfig | IConfiguration : バージョン管理されていないオブジェクトを表すIConfiguration 。 |
args | String : コマンドライン引数。 |
戻り値 | |
---|---|
File | TF サンドボックス環境の jar を含むERROR(/File) ディレクトリ。 |
環境を準備する
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 (TestInformation info, IConfiguration configuration, ITestLogger logger)
設定した環境でサンドボックスを実行します。
パラメーター | |
---|---|
info | TestInformation : 呼び出しを説明するTestInformation |
configuration | IConfiguration : 実行するコマンドのIConfiguration 。 |
logger | ITestLogger : ファイルのログを記録できるITestLogger 。 |
戻り値 | |
---|---|
CommandResult | サンドボックスの実行ステータスとログを含むCommandResult 。 |
取り壊す
public abstract void tearDown ()
変更された可能性のある状態、ファイル、または環境をクリーンアップします。