提交 cbcba39d 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

close task#39021

上级 6242dfda
...@@ -12,7 +12,7 @@ step3 >> expect 3 ...@@ -12,7 +12,7 @@ step3 >> expect 3
*/ */
checkStep1() || print("expect 1\n"); checkStep1() || print("expect 0\n");
checkStep3() || print("expect 3\n"); checkStep3() || print("expect 3\n");
function checkStep1(){} function checkStep1(){}
......
...@@ -67,7 +67,9 @@ func GenUnitTestReport(cases []model.UnitResult, classNameMaxWidth int, timeVal ...@@ -67,7 +67,9 @@ func GenUnitTestReport(cases []model.UnitResult, classNameMaxWidth int, timeVal
postFix = "." postFix = "."
} }
logUtils.ScreenAndResult("\n" + logUtils.GetWholeLine(time.Now().Format("2006-01-02 15:04:05")+" "+ logUtils.Result("\n" + logUtils.GetWholeLine(time.Now().Format("2006-01-02 15:04:05")+" "+
i118Utils.I118Prt.Sprintf("found_scripts", strconv.Itoa(len(cases)))+postFix, "="))
logUtils.Screen("\n" + logUtils.GetWholeLine(time.Now().Format("2006-01-02 15:04:05")+" "+
i118Utils.I118Prt.Sprintf("found_scripts", color.CyanString(strconv.Itoa(len(cases))))+postFix, "=")) i118Utils.I118Prt.Sprintf("found_scripts", color.CyanString(strconv.Itoa(len(cases))))+postFix, "="))
if report.Total == 0 { if report.Total == 0 {
......
...@@ -22,12 +22,15 @@ func ExeScripts(casesToRun []string, casesToIgnore []string, report *model.TestR ...@@ -22,12 +22,15 @@ func ExeScripts(casesToRun []string, casesToIgnore []string, report *model.TestR
postFix = "." postFix = "."
} }
msg := now.Format("2006-01-02 15:04:05") + " " + logUtils.Result("\n" + logUtils.GetWholeLine(now.Format("2006-01-02 15:04:05")+" "+
i118Utils.I118Prt.Sprintf("found_scripts", color.CyanString(strconv.Itoa(len(casesToRun)))) + postFix i118Utils.I118Prt.Sprintf("found_scripts", strconv.Itoa(len(casesToRun)))+postFix, "="))
logUtils.ScreenAndResult("\n" + logUtils.GetWholeLine(msg, "=")) logUtils.Screen("\n" + logUtils.GetWholeLine(now.Format("2006-01-02 15:04:05")+" "+
i118Utils.I118Prt.Sprintf("found_scripts", color.CyanString(strconv.Itoa(len(casesToRun))))+postFix, "="))
if len(casesToIgnore) > 0 { if len(casesToIgnore) > 0 {
logUtils.ScreenAndResult(" " + logUtils.Result(" " +
i118Utils.I118Prt.Sprintf("ignore_scripts", strconv.Itoa(len(casesToIgnore))) + postFix)
logUtils.Screen(" " +
i118Utils.I118Prt.Sprintf("ignore_scripts", color.CyanString(strconv.Itoa(len(casesToIgnore)))) + postFix) i118Utils.I118Prt.Sprintf("ignore_scripts", color.CyanString(strconv.Itoa(len(casesToIgnore)))) + postFix)
} }
......
...@@ -93,7 +93,7 @@ func GenZTFTestReport(report model.TestReport, pathMaxWidth int) { ...@@ -93,7 +93,7 @@ func GenZTFTestReport(report model.TestReport, pathMaxWidth int) {
failStr := fmt.Sprintf(fmtStr, report.Fail, float32(report.Fail*100/report.Total), i118Utils.I118Prt.Sprintf("fail")) failStr := fmt.Sprintf(fmtStr, report.Fail, float32(report.Fail*100/report.Total), i118Utils.I118Prt.Sprintf("fail"))
skipStr := fmt.Sprintf(fmtStr, report.Skip, float32(report.Skip*100/report.Total), i118Utils.I118Prt.Sprintf("skip")) skipStr := fmt.Sprintf(fmtStr, report.Skip, float32(report.Skip*100/report.Total), i118Utils.I118Prt.Sprintf("skip"))
// 带映带结果文件 // 打印到结果文件
logUtils.Result("\n" + time.Now().Format("2006-01-02 15:04:05") + " " + logUtils.Result("\n" + time.Now().Format("2006-01-02 15:04:05") + " " +
i118Utils.I118Prt.Sprintf("run_scripts", i118Utils.I118Prt.Sprintf("run_scripts",
report.Total, report.Duration, secTag, report.Total, report.Duration, secTag,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册