OxygenUtil
public
class
OxygenUtil
extends Object
java.lang.Object | |
↳ | com.android.tradefed.device.cloud.OxygenUtil |
Utility to interact with Oxygen service.
Summary
Public constructors | |
---|---|
OxygenUtil()
Default constructor of OxygenUtil |
Public methods | |
---|---|
static
long[]
|
collectDeviceLaunchMetrics(File logDir)
Collect device launcher metrics from vdl_stdout. |
static
|
collectErrorSignatures(File logDir)
Collect error signatures from logs. |
static
String
|
collectOxygenVersion(File logDir)
Collect oxygen version info from oxygeen_version.txt. |
void
|
downloadLaunchFailureLogs(TargetSetupError error, ITestLogger logger)
Download error logs from GCS when Oxygen failed to launch a virtual device. |
static
LogDataType
|
getDefaultLogType(String logFileName)
Determine a log file's log data type based on its name. |
Public constructors
OxygenUtil
public OxygenUtil ()
Default constructor of OxygenUtil
Public methods
collectDeviceLaunchMetrics
public static long[] collectDeviceLaunchMetrics (File logDir)
Collect device launcher metrics from vdl_stdout.
Parameters | |
---|---|
logDir |
File : directory of logs pulled from remote host. |
Returns | |
---|---|
long[] |
collectErrorSignatures
public staticcollectErrorSignatures (File logDir)
Collect error signatures from logs.
Parameters | |
---|---|
logDir |
File : directory of logs pulled from remote host. |
Returns | |
---|---|
|
collectOxygenVersion
public static String collectOxygenVersion (File logDir)
Collect oxygen version info from oxygeen_version.txt.
Parameters | |
---|---|
logDir |
File : directory of logs pulled from remote host. |
Returns | |
---|---|
String |
downloadLaunchFailureLogs
public void downloadLaunchFailureLogs (TargetSetupError error, ITestLogger logger)
Download error logs from GCS when Oxygen failed to launch a virtual device.
Parameters | |
---|---|
error |
TargetSetupError : TargetSetupError raised when leasing device through Oxygen service. |
logger |
ITestLogger : The ITestLogger where to log the file |
getDefaultLogType
public static LogDataType getDefaultLogType (String logFileName)
Determine a log file's log data type based on its name.
Parameters | |
---|---|
logFileName |
String : The remote log file's name. |
Returns | |
---|---|
LogDataType |
A LogDataType which the log file associates with. Will return the type
UNKNOWN if unable to determine the log data type based on its name. |