fix: use log file when not found log content

This commit is contained in:
huangbin.beal
2023-11-29 21:08:06 +08:00
parent c690b86f2e
commit b41aa6fde6
5 changed files with 263 additions and 240 deletions

View File

@@ -22,15 +22,18 @@ var (
const (
ResultsDirName = "results"
ScreenshotsDirName = "screenshots"
ActionLogDireName = "action_log"
)
var (
RootDir string
ResultsDir string
ResultsPath string
ScreenShotsPath string
StartTime = time.Now()
StartTimeStr = StartTime.Format("20060102150405")
RootDir string
ResultsDir string
ResultsPath string
ScreenShotsPath string
StartTime = time.Now()
StartTimeStr = StartTime.Format("20060102150405")
ActionLogFilePath string
DeviceActionLogFilePath string
)
func init() {
@@ -43,4 +46,6 @@ func init() {
ResultsDir = filepath.Join(ResultsDirName, StartTimeStr)
ResultsPath = filepath.Join(RootDir, ResultsDir)
ScreenShotsPath = filepath.Join(ResultsPath, ScreenshotsDirName)
ActionLogFilePath = filepath.Join(ResultsDir, ActionLogDireName)
DeviceActionLogFilePath = "/sdcard/Android/data/io.appium.uiautomator2.server/files/hodor"
}