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
ไดเรกทอรีที่ใช้ค้นหาบันทึก netsim จากบริการ Oxygen |
String |
NETSIM_USER_LOG_DIR
|
String |
OXYGEN_CUTTLEFISH_FETCH_LOG
บันทึกการดึงข้อมูล CVD |
String |
OXYGEN_CUTTLEFISH_LOG_DIR
ไดเรกทอรีที่บันทึกบันทึกของอุปกรณ์ Oxygen |
String |
OXYGEN_EMULATOR_LOG_DIR
ไดเรกทอรีที่ใช้ค้นหาบันทึกของโปรแกรมจำลองจากบริการ Oxygen |
String |
OXYGEN_GOLDFISH_LOG_DIR
ไดเรกทอรีที่ใช้ค้นหาบันทึกของ Goldfish จากบริการ Oxygen |
String |
OXYGEN_RUNTIME_LOG_DIR
ไดเรกทอรีที่ใช้ค้นหาบันทึกรันไทม์ของอุปกรณ์ Oxygen |
String |
TOMBSTONES_ZIP_NAME
|
ช่อง | |
|---|---|
public
static
final
MultiMap<TestDeviceOptions.InstanceType, CommonLogRemoteFileUtil.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)
เรียกใช้คำสั่งเพื่อตรวจสอบการเชื่อมต่อ SSH กับอินสแตนซ์ GCE ระยะไกล |
static
boolean
|
isRemoteGceReachableBySsh(GceAvdInfo gceAvd, TestDeviceOptions options, IRunUtil runUtil, String... command)
เรียกใช้คำสั่งเพื่อตรวจสอบการเชื่อมต่อ SSH กับอินสแตนซ์ GCE ระยะไกล |
static
void
|
logRemoteCommandOutput(ITestLogger testLogger, GceAvdInfo gceAvd, TestDeviceOptions options, IRunUtil runUtil, String logName, String... remoteCommand)
เรียกใช้คำสั่งในอินสแตนซ์ระยะไกลและบันทึกเอาต์พุต |
static
void
|
pullCommonCvdLogs(GceAvdInfo gceAvdInfo, HostOrchestratorUtil hoUtil, ITestLogger logger)
ดึงบันทึก CF ผ่าน Host Orchestrator |
static
void
|
pullCommonCvdLogs(GceAvdInfo gceAvdInfo, HostOrchestratorUtil hOUtil, ITestLogger logger, TestDeviceOptions options)
ดึงบันทึก CF ผ่าน Host Orchestrator |
ค่าคงที่
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
ไดเรกทอรีที่ใช้ค้นหาบันทึก netsim จากบริการ Oxygen
ค่าคงที่ "/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
ค่าคงที่: "/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
ไดเรกทอรีที่ใช้ค้นหาบันทึกของ Goldfish จากบริการ Oxygen
ค่าคงที่ "/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.InstanceType, CommonLogRemoteFileUtil.KnownLogFileEntry> KNOWN_FILES_TO_FETCH
NETSIM_LOG_FILES
public static finalNETSIM_LOG_FILES
OXYGEN_LOG_FILES
public static finalOXYGEN_LOG_FILES
OXYGEN_LOG_FILES_FALLBACK
public static finalOXYGEN_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)
เรียกใช้คำสั่งเพื่อตรวจสอบการเชื่อมต่อ SSH กับอินสแตนซ์ GCE ระยะไกล
| พารามิเตอร์ | |
|---|---|
gceAvd |
GceAvdInfo: GceAvdInfo ที่อธิบายอุปกรณ์ |
options |
TestDeviceOptions: TestDeviceOptions อธิบายตัวเลือกอุปกรณ์ที่จะใช้สำหรับ
อุปกรณ์ GCE |
runUtil |
IRunUtil: IRunUtil เพื่อเรียกใช้คำสั่ง |
| คิกรีเทิร์น | |
|---|---|
boolean |
บูลีนที่ระบุว่าสามารถเข้าถึง GCE ระยะไกลได้โดยใช้ SSH หรือไม่ |
isRemoteGceReachableBySsh
public static boolean isRemoteGceReachableBySsh (GceAvdInfo gceAvd, TestDeviceOptions options, IRunUtil runUtil, String... command)
เรียกใช้คำสั่งเพื่อตรวจสอบการเชื่อมต่อ SSH กับอินสแตนซ์ GCE ระยะไกล
| พารามิเตอร์ | |
|---|---|
gceAvd |
GceAvdInfo: GceAvdInfo ที่อธิบายอุปกรณ์ |
options |
TestDeviceOptions: TestDeviceOptions อธิบายตัวเลือกอุปกรณ์ที่จะใช้สำหรับ
อุปกรณ์ GCE |
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)
ดึงบันทึก CF ผ่าน Host Orchestrator
| พารามิเตอร์ | |
|---|---|
gceAvdInfo |
GceAvdInfo: ตัวอธิบายของอินสแตนซ์ระยะไกล |
hoUtil |
HostOrchestratorUtil |
logger |
ITestLogger: ITestLogger ที่จะบันทึกไฟล์ |
pullCommonCvdLogs
public static void pullCommonCvdLogs (GceAvdInfo gceAvdInfo, HostOrchestratorUtil hOUtil, ITestLogger logger, TestDeviceOptions options)
ดึงบันทึก CF ผ่าน Host Orchestrator
| พารามิเตอร์ | |
|---|---|
gceAvdInfo |
GceAvdInfo: ตัวอธิบายของอินสแตนซ์ระยะไกล |
hOUtil |
HostOrchestratorUtil: HostOrchestratorUtil ที่ใช้ดึงบันทึก CF |
logger |
ITestLogger: ITestLogger ที่จะบันทึกไฟล์ |
options |
TestDeviceOptions: TestDeviceOptions ที่อธิบายตัวเลือกอุปกรณ์ |