CommonLogRemoteFileUtil

public class CommonLogRemoteFileUtil
extends Object

java.lang.Object
   ↳ com.android.tradefed.device.cloud.CommonLogRemoteFileUtil


このユーティリティを使用すると、共通ファイルのロジックでリモートログを取得する際に、さまざまなリモート デバイス表現間でコードの重複を回避できます。

概要

ネストされたクラス

class CommonLogRemoteFileUtil.KnownLogFileEntry

リモート デバイスの既知のログエントリの表現。 

定数

String EMULATOR_REMOTE_LOG_DIR

エミュレータ インスタンスのデバッグログがあるディレクトリ。

String NESTED_REMOTE_LOG_DIR

ネストされたリモート インスタンスのデバッグログを検索するディレクトリ。

String NETSIM_LOG_DIR

Oxygen サービスから netsim ログを見つけるディレクトリ。

String NETSIM_USER_LOG_DIR

String OXYGEN_CUTTLEFISH_FETCH_LOG

cvd fetch log

String OXYGEN_CUTTLEFISH_LOG_DIR

Oxygen デバイスログのディレクトリ。

String OXYGEN_EMULATOR_LOG_DIR

Oxygen サービスからエミュレータログを見つけるディレクトリ。

String OXYGEN_GOLDFISH_LOG_DIR

Oxygen サービスから goldfish ログを見つけるディレクトリ。

String OXYGEN_RUNTIME_LOG_DIR

Oxygen デバイスのランタイム ログがあるディレクトリ。

String TOMBSTONES_ZIP_NAME

フィールド

public static final MultiMap<TestDeviceOptions.InstanceTypeCommonLogRemoteFileUtil.KnownLogFileEntry> KNOWN_FILES_TO_FETCH

public static final NETSIM_LOG_FILES

public static final OXYGEN_LOG_FILES

public static final OXYGEN_LOG_FILES_FALLBACK

以前のバージョンの Cuttlefish では、ログファイルは cuttlefish_runtime ディレクトリにのみ存在します。

パブリック コンストラクタ

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

エミュレータ インスタンスのデバッグログがあるディレクトリ。

定数値: "/home/%s/log/"

NESTED_REMOTE_LOG_DIR

public static final String NESTED_REMOTE_LOG_DIR

ネストされたリモート インスタンスのデバッグログを検索するディレクトリ。

定数値: "/home/%s/cuttlefish_runtime/"

NETSIM_LOG_DIR

public static final String NETSIM_LOG_DIR

Oxygen サービスから netsim ログを見つけるディレクトリ。

定数値: "/tmp/android/netsimd/"

NETSIM_USER_LOG_DIR

public static final String NETSIM_USER_LOG_DIR

定数値: "/tmp/android-%s/netsimd/"

OXYGEN_CUTTLEFISH_FETCH_LOG

public static final String OXYGEN_CUTTLEFISH_FETCH_LOG

cvd fetch log

定数値: "/tmp/cfbase/3/fetch.log"

OXYGEN_CUTTLEFISH_LOG_DIR

public static final String OXYGEN_CUTTLEFISH_LOG_DIR

Oxygen デバイスログのディレクトリ。

定数値: "/tmp/cfbase/3/cuttlefish/instances/cvd-1/logs/"

OXYGEN_EMULATOR_LOG_DIR

public static final String OXYGEN_EMULATOR_LOG_DIR

Oxygen サービスのエミュレータログの保存先ディレクトリ。

定数値: "/tmp/device_launcher/"

OXYGEN_GOLDFISH_LOG_DIR

public static final String OXYGEN_GOLDFISH_LOG_DIR

Oxygen サービスから goldfish ログを見つけるディレクトリ。

定数値: "/tmp/android_platform_gf*/logs/"

OXYGEN_RUNTIME_LOG_DIR

public static final String OXYGEN_RUNTIME_LOG_DIR

Oxygen デバイスのランタイム ログがあるディレクトリ。OXYGEN_CUTTLEFISH_LOG_DIR が見つからない場合にのみ使用します。

定数値: "/tmp/cfbase/3/cuttlefish_runtime/"

TOMBSTONES_ZIP_NAME

public static final String TOMBSTONES_ZIP_NAME

定数値: "tombstones-zip"

フィールド

KNOWN_FILES_TO_FETCH

public static final MultiMap<TestDeviceOptions.InstanceTypeCommonLogRemoteFileUtil.KnownLogFileEntry> KNOWN_FILES_TO_FETCH

NETSIM_LOG_FILES

public static final  NETSIM_LOG_FILES

OXYGEN_LOG_FILES

public static final  OXYGEN_LOG_FILES

OXYGEN_LOG_FILES_FALLBACK

public static final  OXYGEN_LOG_FILES_FALLBACK

以前のバージョンの Cuttlefish では、ログファイルは cuttlefish_runtime ディレクトリにのみ存在します。

パブリック コンストラクタ

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 ログの取得に使用される HostOrchestratorUtil

logger ITestLogger: ファイルをログに記録する ITestLogger

options TestDeviceOptions: デバイス オプションを記述する TestDeviceOptions