ISサンドボックス
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 () 変更された可能性のある状態、ファイル、または環境をクリーンアップします。 |
公開メソッド
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) ディレクトリ。 |
環境の準備
public abstract Exception prepareEnvironment (IInvocationContext context, IConfiguration configuration, ITestInvocationListener listener)
サンドボックスが適切に実行されるように環境を準備します。
パラメーター | |
---|---|
context | IInvocationContext : 現在の呼び出しIInvocationContext 。 |
configuration | IConfiguration : 実行するコマンドのIConfiguration 。 |
listener | ITestInvocationListener : 最終結果がパイプされる現在の呼び出しITestInvocationListener 。 |
戻り値 | |
---|---|
Exception | 失敗を含むERROR(/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 ()
変更された可能性のある状態、ファイル、または環境をクリーンアップします。