Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
629e94ac
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
9 个月 前同步成功
通知
11
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
3
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zentaoatf
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
3
Issue
3
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
629e94ac
编写于
7月 20, 2022
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix load config and zip results issues for unittest
上级
2ff524dd
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
10 addition
and
6 deletion
+10
-6
Makefile
Makefile
+1
-1
internal/command/action/ztfResult.go
internal/command/action/ztfResult.go
+0
-1
internal/pkg/helper/exec/report-unit.go
internal/pkg/helper/exec/report-unit.go
+3
-3
internal/pkg/helper/exec/unit.go
internal/pkg/helper/exec/unit.go
+6
-1
未找到文件。
Makefile
浏览文件 @
629e94ac
VERSION
=
3.0.0
VERSION
=
3.0.0
_beta1
PROJECT
=
ztf
QINIU_DIR
=
/Users/aaron/work/zentao/qiniu/
QINIU_DIST_DIR
=
${QINIU_DIR}${PROJECT}
/
${VERSION}
/
...
...
internal/command/action/ztfResult.go
浏览文件 @
629e94ac
...
...
@@ -56,6 +56,5 @@ func CommitZTFTestResult(files []string, productId int, taskIdOrName string, noN
}
config
:=
configHelper
.
LoadByWorkspacePath
(
commConsts
.
ZtfDir
)
err
=
zentaoHelper
.
CommitResult
(
report
,
result
.
ProductId
,
result
.
TaskId
,
config
,
nil
)
}
internal/pkg/helper/exec/report-unit.go
浏览文件 @
629e94ac
...
...
@@ -33,8 +33,8 @@ func GenUnitTestReport(req serverDomain.TestSet, startTime, endTime int64,
key
:=
stringUtils
.
Md5
(
req
.
WorkspacePath
)
testSuites
,
zipDir
:=
RetrieveUnitResult
(
req
.
WorkspacePath
,
startTime
,
req
.
TestTool
,
req
.
BuildTool
)
unitResultPath
:=
filepath
.
Join
(
commConsts
.
ExecLogDir
,
commConsts
.
ResultZip
)
fileUtils
.
ZipDir
(
unitResultPath
,
zipDir
)
zipFile
:=
filepath
.
Join
(
commConsts
.
ExecLogDir
,
commConsts
.
ResultZip
)
fileUtils
.
ZipDir
(
zipFile
,
zipDir
)
cases
,
classNameMaxWidth
,
duration
:=
ParserUnitTestResult
(
testSuites
)
...
...
@@ -196,7 +196,7 @@ func RetrieveUnitResult(workspacePath string, startTime int64, testTool commCons
resultDir
=
"results"
zipDir
=
resultDir
}
else
{
resultDir
=
""
resultDir
=
"
testresult.xml
"
zipDir
=
resultDir
}
...
...
internal/pkg/helper/exec/unit.go
浏览文件 @
629e94ac
...
...
@@ -55,7 +55,12 @@ func ExecUnit(ch chan int,
// submit result
if
req
.
SubmitResult
{
config
:=
configHelper
.
LoadByWorkspacePath
(
req
.
WorkspacePath
)
configDir
:=
req
.
WorkspacePath
if
commConsts
.
ExecFrom
==
commConsts
.
FromCmd
{
configDir
=
commConsts
.
ZtfDir
}
config
:=
configHelper
.
LoadByWorkspacePath
(
configDir
)
err
=
zentaoHelper
.
CommitResult
(
report
,
req
.
ProductId
,
0
,
config
,
wsMsg
)
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录