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

fix path issues

上级 32203420
...@@ -99,7 +99,8 @@ func coloredStatus(status commConsts.ResultStatus) string { ...@@ -99,7 +99,8 @@ func coloredStatus(status commConsts.ResultStatus) string {
} }
func reportBug(resultDir string, caseId string, productId int) error { func reportBug(resultDir string, caseId string, productId int) error {
config := configHelper.LoadByWorkspacePath(commConsts.WorkDir) config := configHelper.LoadByWorkspacePath(commConsts.ZtfDir)
bugFields, _ = zentaoHelper.GetBugFiledOptions(config, bug.Product) bugFields, _ = zentaoHelper.GetBugFiledOptions(config, bug.Product)
bug = zentaoHelper.PrepareBug(commConsts.WorkDir, resultDir, caseId, productId) bug = zentaoHelper.PrepareBug(commConsts.WorkDir, resultDir, caseId, productId)
......
...@@ -10,7 +10,7 @@ import ( ...@@ -10,7 +10,7 @@ import (
func CommitCases(files []string) { func CommitCases(files []string) {
cases := scriptHelper.GetCaseByDirAndFile(files) cases := scriptHelper.GetCaseByDirAndFile(files)
config := configHelper.LoadByWorkspacePath(commConsts.WorkDir) config := configHelper.LoadByWorkspacePath(commConsts.ZtfDir)
zentaoHelper.SyncToZentao(cases, config) zentaoHelper.SyncToZentao(cases, config)
} }
...@@ -26,7 +26,7 @@ func Checkout(productId, moduleId, suiteId, taskId string, independentFile bool, ...@@ -26,7 +26,7 @@ func Checkout(productId, moduleId, suiteId, taskId string, independentFile bool,
Lang: scriptLang, Lang: scriptLang,
} }
config := configHelper.LoadByWorkspacePath(commConsts.WorkDir) config := configHelper.LoadByWorkspacePath(commConsts.ZtfDir)
zentaoHelper.SyncFromZentao(settings, config, commConsts.WorkDir) zentaoHelper.SyncFromZentao(settings, config, commConsts.WorkDir)
} }
...@@ -27,7 +27,8 @@ func GenExpectFiles(files []string) error { ...@@ -27,7 +27,8 @@ func GenExpectFiles(files []string) error {
logUtils.Info("\n" + i118Utils.Sprintf("no_cases")) logUtils.Info("\n" + i118Utils.Sprintf("no_cases"))
return nil return nil
} }
conf := configHelper.LoadByWorkspacePath(commConsts.WorkDir) conf := configHelper.LoadByWorkspacePath(commConsts.ZtfDir)
casesToRun, _ := execHelper.FilterCases(cases, conf) casesToRun, _ := execHelper.FilterCases(cases, conf)
dryRunScripts(casesToRun) dryRunScripts(casesToRun)
...@@ -42,7 +43,8 @@ func dryRunScripts(casesToRun []string) { ...@@ -42,7 +43,8 @@ func dryRunScripts(casesToRun []string) {
} }
} }
func dryRunScript(file string) { func dryRunScript(file string) {
conf := configHelper.LoadByWorkspacePath(commConsts.WorkDir) conf := configHelper.LoadByWorkspacePath(commConsts.ZtfDir)
out, _ := execHelper.RunFile(file, commConsts.WorkDir, conf, nil, nil) out, _ := execHelper.RunFile(file, commConsts.WorkDir, conf, nil, nil)
expFile := filepath.Join(filepath.Dir(file), fileUtils.GetFileNameWithoutExt(file)+".exp") expFile := filepath.Join(filepath.Dir(file), fileUtils.GetFileNameWithoutExt(file)+".exp")
......
...@@ -44,6 +44,7 @@ func CommitZTFTestResult(files []string, productId, taskId int, noNeedConfirm bo ...@@ -44,6 +44,7 @@ func CommitZTFTestResult(files []string, productId, taskId int, noNeedConfirm bo
return return
} }
config := configHelper.LoadByWorkspacePath(commConsts.WorkDir) config := configHelper.LoadByWorkspacePath(commConsts.ZtfDir)
err = zentaoHelper.CommitResult(report, result.ProductId, result.TaskId, config, nil) err = zentaoHelper.CommitResult(report, result.ProductId, result.TaskId, config, nil)
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册