mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-25 17:44:02 +08:00
change: remove byted go-ios
This commit is contained in:
2
go.mod
2
go.mod
@@ -157,6 +157,4 @@ require (
|
||||
software.sslmate.com/src/go-pkcs12 v0.2.0 // indirect
|
||||
)
|
||||
|
||||
replace github.com/danielpaulus/go-ios => code.byted.org/yuhongzheng/go-ios v0.0.0-20250619061606-bbfa2c208398
|
||||
|
||||
// replace github.com/httprunner/funplugin => ../funplugin
|
||||
|
||||
4
go.sum
4
go.sum
@@ -1,6 +1,4 @@
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
code.byted.org/yuhongzheng/go-ios v0.0.0-20250619061606-bbfa2c208398 h1:oDMPs9vRnMn1ZAT2SJSejoyV5BwiiWw1JPvifrLlOl4=
|
||||
code.byted.org/yuhongzheng/go-ios v0.0.0-20250619061606-bbfa2c208398/go.mod h1:ZkUcaC59yNba47j/+ULKsCi3dYPFwY9r39PxdmVmLHE=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ=
|
||||
github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE=
|
||||
@@ -85,6 +83,8 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/danielpaulus/go-ios v1.0.161 h1:HhQO/GqINde9Xrvge5ksHxLQk5hQmUAxE7CcS2bIc4A=
|
||||
github.com/danielpaulus/go-ios v1.0.161/go.mod h1:ZkUcaC59yNba47j/+ULKsCi3dYPFwY9r39PxdmVmLHE=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||
|
||||
@@ -19,6 +19,7 @@ import (
|
||||
"github.com/danielpaulus/go-ios/ios/instruments"
|
||||
"github.com/danielpaulus/go-ios/ios/testmanagerd"
|
||||
"github.com/danielpaulus/go-ios/ios/tunnel"
|
||||
"github.com/danielpaulus/go-ios/ios/zipconduit"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
||||
@@ -141,6 +142,7 @@ type DeviceDetail struct {
|
||||
WiFiAddress string `json:"wifiAddress,omitempty"`
|
||||
BuildVersion string `json:"buildVersion,omitempty"`
|
||||
}
|
||||
|
||||
type ApplicationType string
|
||||
|
||||
const (
|
||||
@@ -238,11 +240,21 @@ func (dev *IOSDevice) NewDriver() (driver IDriver, err error) {
|
||||
}
|
||||
|
||||
func (dev *IOSDevice) Install(appPath string, opts ...option.InstallOption) (err error) {
|
||||
conn, err := installationproxy.New(dev.DeviceEntry)
|
||||
if err != nil {
|
||||
return err
|
||||
installOpts := option.NewInstallOptions(opts...)
|
||||
for i := 0; i <= installOpts.RetryTimes; i++ {
|
||||
var conn *zipconduit.Connection
|
||||
conn, err = zipconduit.New(dev.DeviceEntry)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to create zipconduit connection")
|
||||
}
|
||||
defer conn.Close()
|
||||
err = conn.SendFile(appPath)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Int("retry_times", i).Msg("failed to install app")
|
||||
continue
|
||||
}
|
||||
return nil
|
||||
}
|
||||
err = conn.Install(dev.DeviceEntry, appPath)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user