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

test and fix on win7

上级 3d7cd39f
......@@ -17,7 +17,8 @@ func Run(scriptDir string, fileNames []string, langType string) {
LangMap := script.LangMap
var files []string
if fileNames != nil && len(fileNames) > 0 {
if fileNames != nil && len(fileNames) > 0 { // pass a list
if len(fileNames) == 1 {
if strings.Index(fileNames[0], ".suite") > -1 {
utils.RunMode = misc.SUITE
......@@ -31,7 +32,7 @@ func Run(scriptDir string, fileNames []string, langType string) {
}
files, _ = utils.GetSpecifiedFiles(scriptDir, fileNames)
} else {
} else { // give a dir
files, _ = utils.GetAllFiles(scriptDir, LangMap[langType]["extName"])
utils.RunMode = misc.DIR
utils.RunDir = utils.PathToRunName(scriptDir)
......
......@@ -2,6 +2,7 @@ package utils
import (
"github.com/easysoft/zentaoatf/src/misc"
"log"
"os"
"path"
"regexp"
......@@ -48,6 +49,7 @@ func PathToRunName(filePath string) string {
name := path.Base(filePath)
ext := path.Ext(filePath)
name = strings.Replace(name, ext, "", -1)
log.Panic(name)
runName := RunMode.String() + "-" + name + "-" + DateTimeStrFmt(time.Now(), "2006-01-02 15:04:05") + string(os.PathSeparator)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册