Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Unity
提交
38173753
T
Third Party Unity
项目概览
OpenHarmony
/
Third Party Unity
1 年多 前同步成功
通知
36
Star
144
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Unity
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
38173753
编写于
2月 13, 2017
作者:
M
Mark VanderVoord
提交者:
GitHub
2月 13, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #260 from jeremyhannon/parseUnityFixtureOutputToJUnitFormat
Enhance parseOutput.rb to support Unity fixture output
上级
9d5159f9
4dc04d39
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
34 addition
and
1 deletion
+34
-1
auto/parseOutput.rb
auto/parseOutput.rb
+34
-1
未找到文件。
auto/parseOutput.rb
浏览文件 @
38173753
...
...
@@ -65,6 +65,17 @@ class ParseOutput
@arrayList
.
push
" <testcase classname=
\"
"
+
@testSuite
+
"
\"
name=
\"
"
+
testName
+
"
\"
/>"
end
end
# Test was flagged as having passed so format the output.
# This is using the Unity fixture output and not the original Unity output.
def
testPassedUnityFixture
(
array
)
testSuite
=
array
[
0
].
sub
(
"TEST("
,
""
)
testSuite
=
testSuite
.
sub
(
","
,
""
)
testName
=
array
[
1
].
sub
(
")"
,
""
)
if
@xmlOut
==
true
@arrayList
.
push
" <testcase classname=
\"
"
+
testSuite
+
"
\"
name=
\"
"
+
testName
+
"
\"
/>"
end
end
# Test was flagged as being ingored so format the output
def
testIgnored
(
array
)
...
...
@@ -73,6 +84,14 @@ class ParseOutput
reason
=
array
[
lastItem
].
chomp
testSuiteVerify
(
array
[
@className
])
printf
"%-40s IGNORED
\n
"
,
testName
if
testName
.
start_with?
"TEST("
array2
=
testName
.
split
(
" "
)
@testSuite
=
array2
[
0
].
sub
(
"TEST("
,
""
)
@testSuite
=
@testSuite
.
sub
(
","
,
""
)
testName
=
array2
[
1
].
sub
(
")"
,
""
)
end
if
@xmlOut
==
true
@arrayList
.
push
" <testcase classname=
\"
"
+
@testSuite
+
"
\"
name=
\"
"
+
testName
+
"
\"
>"
@arrayList
.
push
" <skipped type=
\"
TEST IGNORED
\"
> "
+
reason
+
" </skipped>"
...
...
@@ -87,6 +106,14 @@ class ParseOutput
reason
=
array
[
lastItem
].
chomp
+
" at line: "
+
array
[
lastItem
-
3
]
testSuiteVerify
(
array
[
@className
])
printf
"%-40s FAILED
\n
"
,
testName
if
testName
.
start_with?
"TEST("
array2
=
testName
.
split
(
" "
)
@testSuite
=
array2
[
0
].
sub
(
"TEST("
,
""
)
@testSuite
=
@testSuite
.
sub
(
","
,
""
)
testName
=
array2
[
1
].
sub
(
")"
,
""
)
end
if
@xmlOut
==
true
@arrayList
.
push
" <testcase classname=
\"
"
+
@testSuite
+
"
\"
name=
\"
"
+
testName
+
"
\"
>"
@arrayList
.
push
" <failure type=
\"
ASSERT FAILED
\"
> "
+
reason
+
" </failure>"
...
...
@@ -138,7 +165,7 @@ class ParseOutput
lineSize
=
lineArray
.
size
# If we were able to split the line then we can look to see if any of our target words
# were found. Case is important.
if
lineSize
>=
4
if
((
lineSize
>=
4
)
||
(
line
.
start_with?
"TEST("
))
# Determine if this test passed
if
line
.
include?
":PASS"
testPassed
(
lineArray
)
...
...
@@ -149,6 +176,12 @@ class ParseOutput
elsif
line
.
include?
":IGNORE:"
testIgnored
(
lineArray
)
testIgnore
+=
1
elsif
line
.
start_with?
"TEST("
if
line
.
include?
" PASS"
lineArray
=
line
.
split
(
" "
)
testPassedUnityFixture
(
lineArray
)
testPass
+=
1
end
# If none of the keywords are found there are no more tests for this suite so clear
# the test flag
else
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录