diff --git a/.github/ISSUE_TEMPLATE/bug------bug-report.md b/.github/ISSUE_TEMPLATE/bug------bug-report.md new file mode 100644 index 0000000..a56c972 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug------bug-report.md @@ -0,0 +1,21 @@ +--- +name: Bug 报告 | Bug report +about: Create a report to help us improve +title: "【Bug】" +labels: bug +assignees: '' + +--- + +**在提出此issue时,我确认了以下几点(保存后请点击复选框):** + +- [ ] 我已自己确认这是Sonic自身的Bug。 +- [ ] 我接受此issue可能被关闭,并查看开发人员的建议。 + +**Bug 描述** +清晰地描述Bug的情况与详细复现步骤 | A clear and concise description of what the bug is. + +**版本** +Sonic的版本号 | Sonic's Version. +部署的系统(mac,windows32...) | System + diff --git a/.github/pull-request-template.md b/.github/pull-request-template.md new file mode 100644 index 0000000..1f9768b --- /dev/null +++ b/.github/pull-request-template.md @@ -0,0 +1,9 @@ +**在提出此拉取请求时,我确认了以下几点(保存后请点击复选框):** + +- [ ] 我已检查没有与此请求重复的拉取请求。 +- [ ] 我已经考虑过,并确认这份呈件对其他人很有价值。 +- [ ] 我接受此提交可能不会被使用,并根据维护人员的意愿关闭拉取请求。 + +**填写PR内容:** + +- diff --git a/cmd/run/wda.go b/cmd/run/wda.go index 96a23d9..61e57e1 100644 --- a/cmd/run/wda.go +++ b/cmd/run/wda.go @@ -95,15 +95,26 @@ var wdaCmd = &cobra.Command{ shutWdaDown := make(chan os.Signal, syscall.SIGTERM) signal.Notify(shutWdaDown, os.Interrupt, os.Kill) - go func() { - for s := range output { - fmt.Print(s) - if strings.Contains(s, "ServerURLHere->") { - fmt.Println("WebDriverAgent server start successful") + if !disableShowLog { + go func() { + for { + select { + case s, ok := <-output: + if ok { + fmt.Print(s) + if strings.Contains(s, "ServerURLHere->") { + fmt.Println("WebDriverAgent server start successful") + } + } else { + return + } + case <-shutWdaDown: + return + } } - } - shutWdaDown <- os.Interrupt - }() + shutWdaDown <- os.Interrupt + }() + } <-shutWdaDown stopTest() @@ -120,11 +131,13 @@ var ( serverLocalPort int mjpegLocalPort int disableMjpegProxy bool + disableShowLog bool ) func initWda() { runRootCMD.AddCommand(wdaCmd) wdaCmd.Flags().BoolVarP(&disableMjpegProxy, "disable-mjpeg-proxy", "", false, "disable mjpeg-server proxy") + wdaCmd.Flags().BoolVarP(&disableShowLog, "disable-show-log", "", false, "disable print wda logs") wdaCmd.Flags().StringVarP(&udid, "udid", "u", "", "device's serialNumber ( default first device )") wdaCmd.Flags().StringVarP(&wdaBundleID, "bundleId", "b", "com.facebook.WebDriverAgentRunner.xctrunner", "WebDriverAgentRunner bundleId") wdaCmd.Flags().IntVarP(&serverRemotePort, "server-remote-port", "", 8100, "WebDriverAgentRunner server remote port")