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)
スペシャル モードがメイン実行から切断された場合: 親に構成が存在しない場合、シン ランチャーにフォールバックし、現在既知の情報でサンドボックスを設定し、作業ディレクトリを埋めて、バージョン管理されたディレクトリに構成を完全に作成します。 |
default
Map<String, List<String>>
|
discoverTests(IInvocationContext context, IConfiguration configuration)
|
default
Map<String, List<String>>
|
discoverTests(IInvocationContext context, IConfiguration configuration, ITestLogger logger)
|
default
IFolderBuildInfo
|
fetchSandboxExtraArtifacts(IInvocationContext context, IConfiguration configuration, String[] args)
サンドボックスに必要な追加のファイルを取得する |
default
File
|
getTradefedSandboxEnvironment(IInvocationContext context, IConfiguration nonVersionedConfig, String[] args)
コマンドライン引数に基づいて使用するサンドボックス環境 TF を返します。 |
default
File
|
getTradefedSandboxEnvironment(IInvocationContext context, IConfiguration nonVersionedConfig, ITestLogger logger, String[] args)
|
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(IInvocationContext,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 を返します。 |
discoverTests
public Map<String, List<String>> discoverTests (IInvocationContext context, IConfiguration configuration)
SandboxOptions.shouldUseTestDiscovery() が有効になっている場合にテストを検出する prepareEnvironment(IInvocationContext,IConfiguration,ITestInvocationListener) のサブステップ。
| パラメータ | |
|---|---|
context |
IInvocationContext: 現在の呼び出し IInvocationContext。 |
configuration |
IConfiguration: 実行するコマンドの IConfiguration。 |
| 戻り値 | |
|---|---|
Map<String, List<String>> |
検出されたテストのマップ。サポートされていない場合や失敗した場合は null。 |
discoverTests
public Map<String, List<String>> discoverTests (IInvocationContext context, IConfiguration configuration, ITestLogger logger)
| パラメータ | |
|---|---|
context |
IInvocationContext |
configuration |
IConfiguration |
logger |
ITestLogger |
| 戻り値 | |
|---|---|
Map<String, List<String>> |
|
fetchSandboxExtraArtifacts
public IFolderBuildInfo fetchSandboxExtraArtifacts (IInvocationContext context, IConfiguration configuration, String[] args)
サンドボックスに必要な追加のファイルを取得する prepareEnvironment(IInvocationContext,IConfiguration,ITestInvocationListener) のサブステップ。
| パラメータ | |
|---|---|
context |
IInvocationContext: 現在の呼び出し IInvocationContext。 |
configuration |
IConfiguration: 実行するコマンドの IConfiguration。 |
args |
String: コマンドライン引数。 |
| 戻り値 | |
|---|---|
IFolderBuildInfo |
追加のサンドボックス ファイル用にフェッチされたビルド。 |
| 例外 | |
|---|---|
|
com.android.tradefed.build.BuildRetrievalError |
|
com.android.tradefed.config.ConfigurationException |
|
java.io.IOException |
BuildRetrievalError |
|
ConfigurationException |
|
IOException |
|
getTradefedSandboxEnvironment
public File getTradefedSandboxEnvironment (IInvocationContext context, IConfiguration nonVersionedConfig, String[] args)
コマンドライン引数に基づいて使用するサンドボックス環境 TF を返します。
| パラメータ | |
|---|---|
context |
IInvocationContext: 親の IInvocationContext。 |
nonVersionedConfig |
IConfiguration: バージョニングされていないオブジェクトを表す IConfiguration。 |
args |
String: コマンドライン引数。 |
| 戻り値 | |
|---|---|
File |
TF サンドボックス環境の jar を含む File ディレクトリ。 |
| 例外 | |
|---|---|
Exception |
|
getTradefedSandboxEnvironment
public File getTradefedSandboxEnvironment (IInvocationContext context, IConfiguration nonVersionedConfig, ITestLogger logger, String[] args)
| パラメータ | |
|---|---|
context |
IInvocationContext |
nonVersionedConfig |
IConfiguration |
logger |
ITestLogger |
args |
String |
| 戻り値 | |
|---|---|
File |
|
| 例外 | |
|---|---|
Exception |
|
prepareEnvironment
public abstract Exception prepareEnvironment (IInvocationContext context, IConfiguration configuration, ITestInvocationListener listener)
サンドボックスが適切に実行されるように環境を準備します。
| パラメータ | |
|---|---|
context |
IInvocationContext: 現在の呼び出し IInvocationContext。 |
configuration |
IConfiguration: 実行するコマンドの IConfiguration。 |
listener |
ITestInvocationListener: 最終結果をパイプ処理する現在の呼び出し ITestInvocationListener。 |
| 戻り値 | |
|---|---|
Exception |
失敗した場合は Exception。成功した場合は Null。 |
run
public abstract CommandResult run (TestInformation info, IConfiguration configuration, ITestLogger logger)
設定した環境でサンドボックスを実行します。
| パラメータ | |
|---|---|
info |
TestInformation: 呼び出しを説明する TestInformation |
configuration |
IConfiguration: 実行するコマンドの IConfiguration。 |
logger |
ITestLogger: ログファイルを記録できる ITestLogger。 |
| 戻り値 | |
|---|---|
CommandResult |
サンドボックスの実行ステータスとログを含む CommandResult。 |
| 例外 | |
|---|---|
Throwable |
|
tearDown
public abstract void tearDown ()
変更された可能性のある状態、ファイル、環境をクリーンアップします。