change: upgrade go-ios to v1.0.161

This commit is contained in:
lilong.129
2024-11-23 17:35:34 +08:00
parent 3f6ec10ab4
commit ec508012a9
8 changed files with 36 additions and 51 deletions

View File

@@ -19,7 +19,7 @@ var (
var installCmd = &cobra.Command{
Use: "install [flags] PACKAGE",
Short: "Push package to the device and install them atomically",
Short: "push package to the device and install them automatically",
Args: cobra.MinimumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) (err error) {
startTime := time.Now()

View File

@@ -13,7 +13,7 @@ import (
var installCmd = &cobra.Command{
Use: "install [flags] PACKAGE",
Short: "Push package to the device and install them atomically",
Short: "push package to the device and install them automatically",
Args: cobra.MinimumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) (err error) {
startTime := time.Now()

View File

@@ -13,7 +13,7 @@ import (
var uninstallCmd = &cobra.Command{
Use: "uninstall [flags] PACKAGE",
Short: "uninstall Package atomically",
Short: "uninstall package automatically",
Args: cobra.MinimumNArgs(0),
RunE: func(cmd *cobra.Command, args []string) (err error) {
startTime := time.Now()

View File

@@ -1,12 +1,12 @@
package ios
import (
"context"
"fmt"
"strings"
"time"
"github.com/pkg/errors"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/httprunner/httprunner/v4/hrp/internal/sdk"
@@ -33,8 +33,7 @@ var xctestCmd = &cobra.Command{
return err
}
log.Info().Str("bundleID", bundleID).Msg("run xctest")
err = device.RunXCTest(bundleID, testRunnerBundleID, xctestConfig)
err = device.RunXCTest(context.Background(), bundleID, testRunnerBundleID, xctestConfig)
if err != nil {
return errors.Wrap(err, "run xctest failed")
}
@@ -49,9 +48,9 @@ var (
)
func init() {
xctestCmd.Flags().StringVarP(&udid, "udid", "u", "", "filter by device's udid")
xctestCmd.Flags().StringVarP(&bundleID, "bundleID", "b", "", "specify ios bundleID")
xctestCmd.Flags().StringVarP(&testRunnerBundleID, "testRunnerBundleID", "t", "", "specify ios testRunnerBundleID")
xctestCmd.Flags().StringVarP(&xctestConfig, "xctestConfig", "x", "", "specify ios xctestConfig")
xctestCmd.Flags().StringVarP(&udid, "udid", "u", "", "specify ios device's UDID")
xctestCmd.Flags().StringVarP(&bundleID, "bundleID", "b", "com.gtf.wda.runner.xctrunner", "specify ios bundleID")
xctestCmd.Flags().StringVarP(&testRunnerBundleID, "testRunnerBundleID", "t", "com.gtf.wda.runner.xctrunner", "specify ios testRunnerBundleID")
xctestCmd.Flags().StringVarP(&xctestConfig, "xctestConfig", "x", "GtfWdaRunner.xctest", "specify ios xctestConfig")
iosRootCmd.AddCommand(xctestCmd)
}