diff --git a/pkg/lib/expect/goexpect.go b/pkg/lib/expect/goexpect.go index d79f9935e7ead875a9bf7b9a2ed43579c60475cc..5422efe8ac87dad1e59f1c9354ba091d62fad11d 100644 --- a/pkg/lib/expect/goexpect.go +++ b/pkg/lib/expect/goexpect.go @@ -77,7 +77,7 @@ func (e *GExpect) Expect(expect *regexp.Regexp, timeout time.Duration) (out stri if out != "" { err = errors.New(out) } else { - err = errors.New("Time out") + err = errors.New(fmt.Sprintf("Time out, out:%v", out)) } return } diff --git a/test/cli/main.go b/test/cli/main.go index 26c1cd0c888c0801114d9fc869210d0a465ba1da..b9bf810b0a49e3e1080827c82ee1a7d3e68bc398 100644 --- a/test/cli/main.go +++ b/test/cli/main.go @@ -7,24 +7,32 @@ import ( commConsts "github.com/easysoft/zentaoatf/internal/pkg/consts" serverConfig "github.com/easysoft/zentaoatf/internal/server/config" + i118Utils "github.com/easysoft/zentaoatf/pkg/lib/i118" commonTestHelper "github.com/easysoft/zentaoatf/test/helper/common" + uiTest "github.com/easysoft/zentaoatf/test/helper/zentao/ui" ) func main() { + commConsts.ExecFrom = commConsts.FromCmd serverConfig.InitLog() - commConsts.Verbose = true + serverConfig.InitExecLog(commonTestHelper.RootPath) + commConsts.ZtfDir = commonTestHelper.RootPath + i118Utils.Init("zh-CN", commConsts.AppServer) var version = flag.String("zentaoVersion", "", "") testing.Init() flag.Parse() fmt.Println(*version) + defer func() { + uiTest.Close() + }() err := commonTestHelper.InitZentao(*version) if err != nil { fmt.Println("Init zentao data fail ", err) } - err = commonTestHelper.Pull() - if err != nil { - fmt.Println("Git pull code fail ", err) - } + // err = commonTestHelper.Pull() + // if err != nil { + // fmt.Println("Git pull code fail ", err) + // } err = commonTestHelper.BuildCli() if err != nil { fmt.Println("Build cli fail ", err)