mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-07 00:17:37 +08:00
fix: pull folder
This commit is contained in:
@@ -24,6 +24,7 @@ import (
|
|||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
|
||||||
|
"github.com/httprunner/funplugin/myexec"
|
||||||
"github.com/httprunner/httprunner/v5/code"
|
"github.com/httprunner/httprunner/v5/code"
|
||||||
"github.com/httprunner/httprunner/v5/internal/config"
|
"github.com/httprunner/httprunner/v5/internal/config"
|
||||||
"github.com/httprunner/httprunner/v5/internal/utf7"
|
"github.com/httprunner/httprunner/v5/internal/utf7"
|
||||||
@@ -707,13 +708,12 @@ func (ad *ADBDriver) StopCaptureLog() (result interface{}, err error) {
|
|||||||
}
|
}
|
||||||
pointRes := ConvertPoints(ad.Device.Logcat.logs)
|
pointRes := ConvertPoints(ad.Device.Logcat.logs)
|
||||||
// 没有解析到打点日志,走兜底逻辑
|
// 没有解析到打点日志,走兜底逻辑
|
||||||
pointRes = []ExportPoint{}
|
|
||||||
if len(pointRes) == 0 {
|
if len(pointRes) == 0 {
|
||||||
log.Info().Msg("action log is null, use action file >>>")
|
log.Info().Msg("action log is null, use action file >>>")
|
||||||
actionLogDirPath := config.GetConfig().ActionLogDirPath()
|
actionLogDirPath := config.GetConfig().ActionLogDirPath()
|
||||||
files := []string{}
|
files := []string{}
|
||||||
actionLogRegStr := `.*data_\d+\.txt`
|
actionLogRegStr := `.*data_\d+\.txt`
|
||||||
ad.Device.PullFolder(config.DeviceActionLogFilePath, actionLogDirPath)
|
myexec.RunCommand("adb", "-s", ad.Device.Serial(), "pull", config.DeviceActionLogFilePath, actionLogDirPath)
|
||||||
err = filepath.Walk(actionLogDirPath, func(path string, info fs.FileInfo, err error) error {
|
err = filepath.Walk(actionLogDirPath, func(path string, info fs.FileInfo, err error) error {
|
||||||
// 只是需要日志文件
|
// 只是需要日志文件
|
||||||
if ok, _ := regexp.MatchString(actionLogRegStr, path); ok {
|
if ok, _ := regexp.MatchString(actionLogRegStr, path); ok {
|
||||||
|
|||||||
Reference in New Issue
Block a user