Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Unity
提交
d9cd6988
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看板
未验证
提交
d9cd6988
编写于
2月 15, 2018
作者:
M
Mark VanderVoord
提交者:
GitHub
2月 15, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #319 from farrrb/master
Some minor changes for parse_output.rb (Thanks @farrrb and @jeremyhannon !)
上级
7a1157d6
4dfb512a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
18 addition
and
9 deletion
+18
-9
auto/parse_output.rb
auto/parse_output.rb
+18
-9
未找到文件。
auto/parse_output.rb
浏览文件 @
d9cd6988
...
...
@@ -47,7 +47,12 @@ class ParseOutput
@test_flag
=
true
# Split the path name
test_name
=
test_suite_name
.
split
(
'/'
)
test_name
=
if
@class_name
==
1
test_suite_name
.
split
(
'\\'
)
# Windows
else
test_suite_name
.
split
(
'/'
)
# Unix based
end
# Remove the extension
base_name
=
test_name
[
test_name
.
size
-
1
].
split
(
'.'
)
@test_suite
=
'test.'
+
base_name
[
0
]
...
...
@@ -78,11 +83,11 @@ class ParseOutput
@array_list
.
push
' <testcase classname="'
+
test_suite
+
'" name="'
+
test_name
+
'"/>'
end
# Test was flagged as being i
ng
ored so format the output
# Test was flagged as being i
gn
ored so format the output
def
test_ignored
(
array
)
last_item
=
array
.
length
-
1
test_name
=
array
[
last_item
-
2
]
reason
=
array
[
last_item
].
chomp
reason
=
array
[
last_item
].
chomp
.
lstrip
test_suite_verify
(
array
[
@class_name
])
printf
"%-40s IGNORED
\n
"
,
test_name
...
...
@@ -96,7 +101,7 @@ class ParseOutput
return
unless
@xml_out
@array_list
.
push
' <testcase classname="'
+
@test_suite
+
'" name="'
+
test_name
+
'">'
@array_list
.
push
' <skipped type="TEST IGNORED">
'
+
reason
+
'
</skipped>'
@array_list
.
push
' <skipped type="TEST IGNORED">
'
+
reason
+
'
</skipped>'
@array_list
.
push
' </testcase>'
end
...
...
@@ -104,7 +109,7 @@ class ParseOutput
def
test_failed
(
array
)
last_item
=
array
.
length
-
1
test_name
=
array
[
last_item
-
2
]
reason
=
array
[
last_item
].
chomp
+
' at line: '
+
array
[
last_item
-
3
]
reason
=
array
[
last_item
].
chomp
.
lstrip
+
' at line: '
+
array
[
last_item
-
3
]
test_suite_verify
(
array
[
@class_name
])
printf
"%-40s FAILED
\n
"
,
test_name
...
...
@@ -118,11 +123,11 @@ class ParseOutput
return
unless
@xml_out
@array_list
.
push
' <testcase classname="'
+
@test_suite
+
'" name="'
+
test_name
+
'">'
@array_list
.
push
' <failure type="ASSERT FAILED">
'
+
reason
+
'
</failure>'
@array_list
.
push
' <failure type="ASSERT FAILED">
'
+
reason
+
'
</failure>'
@array_list
.
push
' </testcase>'
end
# Figure out what OS we are running on.
For now we are assuming if it's not Windows it must
# Figure out what OS we are running on. For now we are assuming if it's not Windows it must
# be Unix based.
def
detect_os
os
=
RUBY_PLATFORM
.
split
(
'-'
)
...
...
@@ -168,12 +173,16 @@ class ParseOutput
if
line
.
include?
':PASS'
test_passed
(
line_array
)
test_pass
+=
1
elsif
line
.
include?
':FAIL
:
'
elsif
line
.
include?
':FAIL'
test_failed
(
line_array
)
test_fail
+=
1
elsif
line
.
include?
':IGNORE:'
test_ignored
(
line_array
)
test_ignore
+=
1
elsif
line
.
include?
':IGNORE'
line_array
.
push
(
'No reason given'
)
test_ignored
(
line_array
)
test_ignore
+=
1
elsif
line
.
start_with?
'TEST('
if
line
.
include?
' PASS'
line_array
=
line
.
split
(
' '
)
...
...
@@ -199,7 +208,7 @@ class ParseOutput
return
unless
@xml_out
heading
=
'<testsuite tests="'
+
@total_tests
.
to_s
+
'" failures="'
+
test_fail
.
to_s
+
'"'
+
' skips="'
+
test_ignore
.
to_s
+
'">'
heading
=
'<testsuite
name="'
+
@test_suite
.
to_s
+
'"
tests="'
+
@total_tests
.
to_s
+
'" failures="'
+
test_fail
.
to_s
+
'"'
+
' skips="'
+
test_ignore
.
to_s
+
'">'
@array_list
.
insert
(
0
,
heading
)
write_xml_output
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录