mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-04 23:16:57 +08:00
fix: adb logcat clear argument
This commit is contained in:
@@ -329,7 +329,7 @@ func (ad *adbDriver) StartCaptureLog(identifier ...string) (err error) {
|
|||||||
log.Info().Msg("start adb log recording")
|
log.Info().Msg("start adb log recording")
|
||||||
|
|
||||||
// clear logcat
|
// clear logcat
|
||||||
if _, err = ad.adbClient.RunShellCommand("logcat", "--clear"); err != nil {
|
if _, err = ad.adbClient.RunShellCommand("logcat", "-c"); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ func (l *AdbLogcat) CatchLogcat() (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// clear logcat
|
// clear logcat
|
||||||
if err = myexec.RunCommand("adb", "-s", l.serial, "logcat", "--clear"); err != nil {
|
if err = myexec.RunCommand("adb", "-s", l.serial, "shell", "logcat", "-c"); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user