mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-08 17:09:33 +08:00
change: remove debug log
This commit is contained in:
@@ -247,8 +247,7 @@ func (d *Device) RunShellCommand(cmd string, args ...string) (string, error) {
|
|||||||
|
|
||||||
func (d *Device) RunShellCommandWithBytes(cmd string, args ...string) ([]byte, error) {
|
func (d *Device) RunShellCommandWithBytes(cmd string, args ...string) ([]byte, error) {
|
||||||
if d.HasFeature(FeatShellV2) {
|
if d.HasFeature(FeatShellV2) {
|
||||||
raw, err := d.RunShellCommandV2WithBytes(cmd, args...)
|
return d.RunShellCommandV2WithBytes(cmd, args...)
|
||||||
return raw, err
|
|
||||||
}
|
}
|
||||||
if len(args) > 0 {
|
if len(args) > 0 {
|
||||||
cmd = fmt.Sprintf("%s %s", cmd, strings.Join(args, " "))
|
cmd = fmt.Sprintf("%s %s", cmd, strings.Join(args, " "))
|
||||||
@@ -278,7 +277,7 @@ func (d *Device) RunShellCommandV2WithBytes(cmd string, args ...string) ([]byte,
|
|||||||
}
|
}
|
||||||
log.Debug().Str("cmd",
|
log.Debug().Str("cmd",
|
||||||
fmt.Sprintf("adb -s %s shell %s", d.serial, cmd)).
|
fmt.Sprintf("adb -s %s shell %s", d.serial, cmd)).
|
||||||
Msg("run adb command")
|
Msg("run adb command in v2")
|
||||||
raw, err := d.executeCommand(fmt.Sprintf("shell,v2,raw:%s", cmd))
|
raw, err := d.executeCommand(fmt.Sprintf("shell,v2,raw:%s", cmd))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return raw, err
|
return raw, err
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ func newTransport(address string, readTimeout ...time.Duration) (tp transport, e
|
|||||||
|
|
||||||
func (t transport) Send(command string) (err error) {
|
func (t transport) Send(command string) (err error) {
|
||||||
msg := fmt.Sprintf("%04x%s", len(command), command)
|
msg := fmt.Sprintf("%04x%s", len(command), command)
|
||||||
log.Debug().Str("cmd", command).Msg("run adb command")
|
|
||||||
return _send(t.sock, []byte(msg))
|
return _send(t.sock, []byte(msg))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user