CommonLogRemoteFileUtil
public
class
CommonLogRemoteFileUtil
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.device.cloud.CommonLogRemoteFileUtil |
このユーティリティを使用すると、共通ファイルのリモートログ取得ロジックについて、異なるリモート デバイスの表現間でコードの重複を回避できます。
概要
ネストされたクラス | |
|---|---|
class |
CommonLogRemoteFileUtil.KnownLogFileEntry
リモート デバイスの既知のログエントリを表します。 |
フィールド | |
|---|---|
public
static
final
String |
EMULATOR_REMOTE_LOG_DIR
エミュレータ インスタンスのデバッグログが見つかるディレクトリ。 |
public
static
final
MultiMap<TestDeviceOptions.InstanceType, CommonLogRemoteFileUtil.KnownLogFileEntry> |
KNOWN_FILES_TO_FETCH
|
public
static
final
String |
NESTED_REMOTE_LOG_DIR
ネストされたリモート インスタンスのデバッグログが見つかるディレクトリ。 |
public
static
final
String |
NETSIM_LOG_DIR
Oxygen サービスからの netsim ログが見つかるディレクトリ。 |
public
static
final
|
NETSIM_LOG_FILES
|
public
static
final
String |
NETSIM_USER_LOG_DIR
|
public
static
final
String |
OXYGEN_CUTTLEFISH_FETCH_LOG
cvd フェッチログ |
public
static
final
String |
OXYGEN_CUTTLEFISH_LOG_DIR
Oxygen デバイスのログが保存されているディレクトリ。 |
public
static
final
String |
OXYGEN_EMULATOR_LOG_DIR
Oxygen サービスからエミュレータのログを取得できるディレクトリ。 |
public
static
final
String |
OXYGEN_GOLDFISH_LOG_DIR
Oxygen サービスから取得した Goldfish ログが格納されているディレクトリ。 |
public
static
final
|
OXYGEN_LOG_FILES
|
public
static
final
|
OXYGEN_LOG_FILES_FALLBACK
古いバージョンの cuttlefish では、ログファイルは cuttlefish_runtime ディレクトリにのみ存在します。 |
public
static
final
String |
OXYGEN_RUNTIME_LOG_DIR
Oxygen デバイスのランタイムログが保存されているディレクトリ。 |
public
static
final
String |
TOMBSTONES_ZIP_NAME
|
パブリック コンストラクタ | |
|---|---|
CommonLogRemoteFileUtil()
|
|
パブリック メソッド | |
|---|---|
static
void
|
fetchCommonFiles(ITestLogger testLogger, GceAvdInfo gceAvd, TestDeviceOptions options, IRunUtil runUtil)
リモート インスタンスから一般的なファイルを取得してログに記録します。 |
static
void
|
fetchTombstones(ITestLogger testLogger, GceAvdInfo gceAvd, TestDeviceOptions options, IRunUtil runUtil)
リモート インスタンスから墓石を取得してログに記録します。 |
static
boolean
|
isRemoteGceReachableBySsh(GceAvdInfo gceAvd, TestDeviceOptions options, IRunUtil runUtil)
コマンドを実行して、リモート GCE インスタンスへの SSH 接続を検証します。 |
static
boolean
|
isRemoteGceReachableBySsh(GceAvdInfo gceAvd, TestDeviceOptions options, IRunUtil runUtil, String... command)
コマンドを実行して、リモート GCE インスタンスへの SSH 接続を検証します。 |
static
void
|
logRemoteCommandOutput(ITestLogger testLogger, GceAvdInfo gceAvd, TestDeviceOptions options, IRunUtil runUtil, String logName, String... remoteCommand)
リモート インスタンスでコマンドを実行し、出力をログに記録します。 |
static
void
|
pullCommonCvdLogs(GceAvdInfo gceAvdInfo, HostOrchestratorUtil hoUtil, ITestLogger logger)
Host Orchestrator を介して CF ログを pull します。 |
static
void
|
pullCommonCvdLogs(GceAvdInfo gceAvdInfo, HostOrchestratorUtil hOUtil, ITestLogger logger, TestDeviceOptions options)
Host Orchestrator を介して CF ログを pull します。 |
フィールド
EMULATOR_REMOTE_LOG_DIR
public static final String EMULATOR_REMOTE_LOG_DIR
エミュレータ インスタンスのデバッグログが見つかるディレクトリ。
KNOWN_FILES_TO_FETCH
public static final MultiMap<TestDeviceOptions.InstanceType, CommonLogRemoteFileUtil.KnownLogFileEntry> KNOWN_FILES_TO_FETCH
NESTED_REMOTE_LOG_DIR
public static final String NESTED_REMOTE_LOG_DIR
ネストされたリモート インスタンスのデバッグログが見つかるディレクトリ。
NETSIM_LOG_DIR
public static final String NETSIM_LOG_DIR
Oxygen サービスからの netsim ログが見つかるディレクトリ。
NETSIM_LOG_FILES
public static finalNETSIM_LOG_FILES
NETSIM_USER_LOG_DIR
public static final String NETSIM_USER_LOG_DIR
OXYGEN_CUTTLEFISH_FETCH_LOG
public static final String OXYGEN_CUTTLEFISH_FETCH_LOG
cvd フェッチログ
OXYGEN_CUTTLEFISH_LOG_DIR
public static final String OXYGEN_CUTTLEFISH_LOG_DIR
Oxygen デバイスのログが保存されているディレクトリ。
OXYGEN_EMULATOR_LOG_DIR
public static final String OXYGEN_EMULATOR_LOG_DIR
Oxygen サービスからエミュレータのログを取得できるディレクトリ。
OXYGEN_GOLDFISH_LOG_DIR
public static final String OXYGEN_GOLDFISH_LOG_DIR
Oxygen サービスから取得した Goldfish ログが格納されているディレクトリ。
OXYGEN_LOG_FILES
public static finalOXYGEN_LOG_FILES
OXYGEN_LOG_FILES_FALLBACK
public static finalOXYGEN_LOG_FILES_FALLBACK
古いバージョンの cuttlefish では、ログファイルは cuttlefish_runtime ディレクトリにのみ存在します。
OXYGEN_RUNTIME_LOG_DIR
public static final String OXYGEN_RUNTIME_LOG_DIR
Oxygen デバイスのランタイムログが保存されているディレクトリ。OXYGEN_CUTTLEFISH_LOG_DIR が見つからない場合にのみ使用します。
TOMBSTONES_ZIP_NAME
public static final String TOMBSTONES_ZIP_NAME
パブリック コンストラクタ
CommonLogRemoteFileUtil
public CommonLogRemoteFileUtil ()
パブリック メソッド
fetchCommonFiles
public static void fetchCommonFiles (ITestLogger testLogger, GceAvdInfo gceAvd, TestDeviceOptions options, IRunUtil runUtil)
リモート インスタンスから一般的なファイルを取得してログに記録します。
| パラメータ | |
|---|---|
testLogger |
ITestLogger: ファイルをロギングする ITestLogger。 |
gceAvd |
GceAvdInfo: リモート インスタンスの記述子。 |
options |
TestDeviceOptions: デバイス オプションを記述する TestDeviceOptions |
runUtil |
IRunUtil: コマンドを実行する IRunUtil。 |
fetchTombstones
public static void fetchTombstones (ITestLogger testLogger, GceAvdInfo gceAvd, TestDeviceOptions options, IRunUtil runUtil)
リモート インスタンスから墓石を取得してログに記録します。
| パラメータ | |
|---|---|
testLogger |
ITestLogger: ファイルをロギングする ITestLogger。 |
gceAvd |
GceAvdInfo: リモート インスタンスの記述子。 |
options |
TestDeviceOptions: デバイス オプションを記述する TestDeviceOptions |
runUtil |
IRunUtil: コマンドを実行する IRunUtil。 |
isRemoteGceReachableBySsh
public static boolean isRemoteGceReachableBySsh (GceAvdInfo gceAvd, TestDeviceOptions options, IRunUtil runUtil)
コマンドを実行して、リモート GCE インスタンスへの SSH 接続を検証します。
| パラメータ | |
|---|---|
gceAvd |
GceAvdInfo: デバイスを記述する GceAvdInfo。 |
options |
TestDeviceOptions: GCE デバイスに使用するデバイス オプションを記述する TestDeviceOptions。 |
runUtil |
IRunUtil: コマンドを実行する IRunUtil。 |
| 戻り値 | |
|---|---|
boolean |
リモート GCE に ssh でアクセスできるかどうかを示すブール値。 |
isRemoteGceReachableBySsh
public static boolean isRemoteGceReachableBySsh (GceAvdInfo gceAvd, TestDeviceOptions options, IRunUtil runUtil, String... command)
コマンドを実行して、リモート GCE インスタンスへの SSH 接続を検証します。
| パラメータ | |
|---|---|
gceAvd |
GceAvdInfo: デバイスを記述する GceAvdInfo。 |
options |
TestDeviceOptions: GCE デバイスに使用するデバイス オプションを記述する TestDeviceOptions。 |
runUtil |
IRunUtil: コマンドを実行する IRunUtil。 |
command |
String: 実行するコマンド。 |
| 戻り値 | |
|---|---|
boolean |
リモート GCE に ssh でアクセスできるかどうかを示すブール値。 |
logRemoteCommandOutput
public static void logRemoteCommandOutput (ITestLogger testLogger, GceAvdInfo gceAvd, TestDeviceOptions options, IRunUtil runUtil, String logName, String... remoteCommand)
リモート インスタンスでコマンドを実行し、出力をログに記録する
| パラメータ | |
|---|---|
testLogger |
ITestLogger: ファイルをロギングする ITestLogger。 |
gceAvd |
GceAvdInfo: リモート インスタンスの記述子。 |
options |
TestDeviceOptions: デバイス オプションを記述する TestDeviceOptions |
runUtil |
IRunUtil: コマンドを実行する IRunUtil。 |
logName |
String: ITestLogger に報告するときに使用するログ名 |
remoteCommand |
String: リモート インスタンスで実行するコマンドライン |
pullCommonCvdLogs
public static void pullCommonCvdLogs (GceAvdInfo gceAvdInfo, HostOrchestratorUtil hoUtil, ITestLogger logger)
Host Orchestrator を介して CF ログを pull します。
| パラメータ | |
|---|---|
gceAvdInfo |
GceAvdInfo: リモート インスタンスの記述子。 |
hoUtil |
HostOrchestratorUtil |
logger |
ITestLogger: ファイルをロギングする ITestLogger。 |
pullCommonCvdLogs
public static void pullCommonCvdLogs (GceAvdInfo gceAvdInfo, HostOrchestratorUtil hOUtil, ITestLogger logger, TestDeviceOptions options)
Host Orchestrator を介して CF ログを pull します。
| パラメータ | |
|---|---|
gceAvdInfo |
GceAvdInfo: リモート インスタンスの記述子。 |
hOUtil |
HostOrchestratorUtil: CF ログの pull に使用される HostOrchestratorUtil。 |
logger |
ITestLogger: ファイルをロギングする ITestLogger。 |
options |
TestDeviceOptions: デバイス オプションを記述する TestDeviceOptions |