fix: parse error exit code

This commit is contained in:
debugtalk
2022-10-24 17:03:47 +08:00
parent d518def919
commit c8878c34b5
29 changed files with 60 additions and 7 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
# Release History # Release History
## v4.3.0 (2022-10-23) ## v4.3.0 (2022-10-24)
Release hrp sub package `uixt` to support iOS/Android UI automation 🎉 Release hrp sub package `uixt` to support iOS/Android UI automation 🎉
@@ -10,7 +10,7 @@ Release hrp sub package `uixt` to support iOS/Android UI automation 🎉
For iOS/Android device management: For iOS/Android device management:
- feat: integrage ios device management with [gidevice], - feat: integrage ios device management with [gidevice]
- feat: integrage android device management with [gadb] - feat: integrage android device management with [gadb]
- feat: add simple commands to interact with iOS/Android devices, try `hrp ios` and `hrp adb` - feat: add simple commands to interact with iOS/Android devices, try `hrp ios` and `hrp adb`
+1 -1
View File
@@ -1 +1 @@
v4.3.0 v4.3.0-10241627
+1 -1
View File
@@ -8,4 +8,4 @@ import (
var VERSION string var VERSION string
// httprunner python version // httprunner python version
const HttpRunnerMinimumVersion = "v4.2.0" const HttpRunnerMinimumVersion = "v4.3.0"
+2
View File
@@ -1,3 +1,5 @@
//go:build localtest
package gadb package gadb
import ( import (
+2
View File
@@ -1,3 +1,5 @@
//go:build localtest
package gadb package gadb
import ( import (
+2
View File
@@ -1,3 +1,5 @@
//go:build localtest
package gadb package gadb
import ( import (
-1
View File
@@ -1 +0,0 @@
/.idea
+2
View File
@@ -1,3 +1,5 @@
//go:build localtest
package gidevice package gidevice
import ( import (
@@ -1,3 +1,5 @@
//go:build localtest
package gidevice package gidevice
import ( import (
+2
View File
@@ -1,3 +1,5 @@
//go:build localtest
package gidevice package gidevice
import ( import (
+2
View File
@@ -1,3 +1,5 @@
//go:build localtest
package gidevice package gidevice
import ( import (
+2
View File
@@ -1,3 +1,5 @@
//go:build localtest
package gidevice package gidevice
import ( import (
@@ -1,3 +1,5 @@
//go:build localtest
package gidevice package gidevice
import ( import (
+2
View File
@@ -1,3 +1,5 @@
//go:build localtest
package gidevice package gidevice
import ( import (
+2
View File
@@ -1,3 +1,5 @@
//go:build localtest
package gidevice package gidevice
import ( import (
+2
View File
@@ -1,3 +1,5 @@
//go:build localtest
package gidevice package gidevice
import ( import (
+2
View File
@@ -1,3 +1,5 @@
//go:build localtest
package ipa package ipa
import ( import (
@@ -1,3 +1,5 @@
//go:build localtest
package nskeyedarchiver package nskeyedarchiver
import ( import (
@@ -1,3 +1,5 @@
//go:build localtest
package nskeyedarchiver package nskeyedarchiver
import ( import (
@@ -1,3 +1,5 @@
//go:build localtest
package nskeyedarchiver package nskeyedarchiver
import ( import (
@@ -1,3 +1,5 @@
//go:build localtest
package nskeyedarchiver package nskeyedarchiver
import ( import (
@@ -1,3 +1,5 @@
//go:build localtest
package nskeyedarchiver package nskeyedarchiver
import ( import (
@@ -1,3 +1,5 @@
//go:build localtest
package nskeyedarchiver package nskeyedarchiver
import ( import (
+2
View File
@@ -1,3 +1,5 @@
//go:build localtest
package gidevice package gidevice
import ( import (
@@ -1,3 +1,5 @@
//go:build localtest
package gidevice package gidevice
import "testing" import "testing"
+2
View File
@@ -1,3 +1,5 @@
//go:build localtest
package gidevice package gidevice
import ( import (
+2
View File
@@ -1,3 +1,5 @@
//go:build localtest
package gidevice package gidevice
import ( import (
+5
View File
@@ -398,6 +398,8 @@ func (dev *IOSDevice) NewHTTPDriver(capabilities Capabilities) (driver WebDriver
return nil, errors.Wrap(code.IOSDeviceHTTPDriverError, return nil, errors.Wrap(code.IOSDeviceHTTPDriverError,
fmt.Sprintf("forward tcp port failed: %v", err)) fmt.Sprintf("forward tcp port failed: %v", err))
} }
} else {
log.Info().Int("WDA_LOCAL_PORT", localPort).Msg("reuse WDA local port")
} }
var localMjpegPort int var localMjpegPort int
@@ -412,6 +414,9 @@ func (dev *IOSDevice) NewHTTPDriver(capabilities Capabilities) (driver WebDriver
return nil, errors.Wrap(code.IOSDeviceHTTPDriverError, return nil, errors.Wrap(code.IOSDeviceHTTPDriverError,
fmt.Sprintf("forward tcp port failed: %v", err)) fmt.Sprintf("forward tcp port failed: %v", err))
} }
} else {
log.Info().Int("WDA_LOCAL_MJPEG_PORT", localMjpegPort).
Msg("reuse WDA local mjpeg port")
} }
log.Info().Interface("capabilities", capabilities). log.Info().Interface("capabilities", capabilities).
+5 -2
View File
@@ -613,8 +613,11 @@ func runStepMobileUI(s *SessionRunner, step *TStep) (stepResult *StepResult, err
// run actions // run actions
for _, action := range actions { for _, action := range actions {
if action.Params, err = s.caseRunner.parser.Parse(action.Params, stepVariables); err != nil { if action.Params, err = s.caseRunner.parser.Parse(action.Params, stepVariables); err != nil {
return stepResult, errors.Wrap(code.ParseError, if !code.IsErrorPredefined(err) {
fmt.Sprintf("parse action params failed: %v", err)) err = errors.Wrap(code.ParseError,
fmt.Sprintf("parse action params failed: %v", err))
}
return stepResult, err
} }
if err := uiDriver.DoAction(action); err != nil { if err := uiDriver.DoAction(action); err != nil {
if !code.IsErrorPredefined(err) { if !code.IsErrorPredefined(err) {