fix: stop logcat only when enabled

This commit is contained in:
lilong.129
2023-02-13 23:34:09 +08:00
parent c4144caf50
commit bf6032520d
4 changed files with 18 additions and 6 deletions
+9 -6
View File
@@ -625,13 +625,16 @@ func (r *SessionRunner) GetSummary() (*TestCaseSummary, error) {
for uuid, client := range r.caseRunner.hrpRunner.uiClients {
// add WDA/UIA logs to summary
log, err := client.Driver.StopCaptureLog()
if err != nil {
return caseSummary, err
}
logs := map[string]interface{}{
"uuid": uuid,
"content": log,
"uuid": uuid,
}
if client.Device.LogEnabled() {
log, err := client.Driver.StopCaptureLog()
if err != nil {
return caseSummary, err
}
logs["content"] = log
}
// stop performance monitor