Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
5ab6d5a0
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5ab6d5a0
编写于
9月 09, 2011
作者:
A
Andrey Kamaev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Perf tests reports - added output format with embedded styles
上级
5c3a93a5
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
40 addition
and
18 deletion
+40
-18
modules/ts/misc/chart.py
modules/ts/misc/chart.py
+3
-3
modules/ts/misc/report.py
modules/ts/misc/report.py
+6
-3
modules/ts/misc/summary.py
modules/ts/misc/summary.py
+6
-3
modules/ts/misc/table_formatter.py
modules/ts/misc/table_formatter.py
+25
-9
未找到文件。
modules/ts/misc/chart.py
浏览文件 @
5ab6d5a0
...
...
@@ -145,7 +145,7 @@ if __name__ == "__main__":
for
i
in
range
(
argsnum
):
arglists
[
i
]
=
sorted
([
str
(
key
)
for
key
in
arglists
[
i
].
iterkeys
()],
key
=
keyselector
)
if
options
.
generateHtml
:
if
options
.
generateHtml
and
options
.
format
!=
"moinwiki"
:
htmlPrintHeader
(
sys
.
stdout
,
"Report %s for %s"
%
(
args
[
0
],
sname
))
indexes
=
[
0
]
*
argsnum
...
...
@@ -191,11 +191,11 @@ if __name__ == "__main__":
tbl
.
newCell
(
col
,
"-"
)
if
options
.
generateHtml
:
tbl
.
htmlPrintTable
(
sys
.
stdout
)
tbl
.
htmlPrintTable
(
sys
.
stdout
,
options
.
format
==
"moinwiki"
)
else
:
tbl
.
consolePrintTable
(
sys
.
stdout
)
if
not
nextPermutation
(
indexes
,
arglists
,
x
,
y
):
break
if
options
.
generateHtml
:
if
options
.
generateHtml
and
options
.
format
!=
"moinwiki"
:
htmlPrintFooter
(
sys
.
stdout
)
\ No newline at end of file
modules/ts/misc/report.py
浏览文件 @
5ab6d5a0
...
...
@@ -91,8 +91,11 @@ if __name__ == "__main__":
# output table
if
options
.
generateHtml
:
htmlPrintHeader
(
sys
.
stdout
,
"Report %s tests from %s"
%
(
len
(
tests
),
", "
.
join
(
files
)))
tbl
.
htmlPrintTable
(
sys
.
stdout
)
htmlPrintFooter
(
sys
.
stdout
)
if
options
.
format
==
"moinwiki"
:
tbl
.
htmlPrintTable
(
sys
.
stdout
,
True
)
else
:
htmlPrintHeader
(
sys
.
stdout
,
"Report %s tests from %s"
%
(
len
(
tests
),
", "
.
join
(
files
)))
tbl
.
htmlPrintTable
(
sys
.
stdout
)
htmlPrintFooter
(
sys
.
stdout
)
else
:
tbl
.
consolePrintTable
(
sys
.
stdout
)
\ No newline at end of file
modules/ts/misc/summary.py
浏览文件 @
5ab6d5a0
...
...
@@ -137,8 +137,11 @@ if __name__ == "__main__":
# output table
if
options
.
generateHtml
:
htmlPrintHeader
(
sys
.
stdout
,
"Summary report for %s tests from %s test logs"
%
(
len
(
test_cases
),
setsCount
))
tbl
.
htmlPrintTable
(
sys
.
stdout
)
htmlPrintFooter
(
sys
.
stdout
)
if
options
.
format
==
"moinwiki"
:
tbl
.
htmlPrintTable
(
sys
.
stdout
,
True
)
else
:
htmlPrintHeader
(
sys
.
stdout
,
"Summary report for %s tests from %s test logs"
%
(
len
(
test_cases
),
setsCount
))
tbl
.
htmlPrintTable
(
sys
.
stdout
)
htmlPrintFooter
(
sys
.
stdout
)
else
:
tbl
.
consolePrintTable
(
sys
.
stdout
)
modules/ts/misc/table_formatter.py
浏览文件 @
5ab6d5a0
...
...
@@ -328,20 +328,26 @@ class table(object):
return
(
height
-
space
+
1
)
/
2
return
0
def
htmlPrintTable
(
self
,
out
):
def
htmlPrintTable
(
self
,
out
,
embeedcss
=
False
):
columns
=
self
.
layoutTable
()
out
.
write
(
"<div class=
\"
tableFormatter
\"
>
\n
<table class=
\"
tbl
\"
>
\n
"
)
if
embeedcss
:
out
.
write
(
"<div style=
\"
font-family: Lucida Console, Courier New, Courier;font-size: 16px;color:#3e4758;
\"
>
\n
<table style=
\"
background:none repeat scroll 0 0 #FFFFFF;border-collapse:collapse;font-family:'Lucida Sans Unicode','Lucida Grande',Sans-Serif;font-size:14px;margin:20px;text-align:left;width:480px;margin-left: auto;margin-right: auto;white-space:nowrap;
\"
>
\n
"
)
else
:
out
.
write
(
"<div class=
\"
tableFormatter
\"
>
\n
<table class=
\"
tbl
\"
>
\n
"
)
if
self
.
caption
:
out
.
write
(
" <caption>%s</caption>
\n
"
%
htmlEncode
(
self
.
reformatTextValue
(
self
.
caption
)))
if
embeedcss
:
out
.
write
(
" <caption style=
\"
font:italic 16px 'Trebuchet MS',Verdana,Arial,Helvetica,sans-serif;padding:0 0 5px;text-align:right;white-space:normal;
\"
>%s</caption>
\n
"
%
htmlEncode
(
self
.
reformatTextValue
(
self
.
caption
)))
else
:
out
.
write
(
" <caption>%s</caption>
\n
"
%
htmlEncode
(
self
.
reformatTextValue
(
self
.
caption
)))
out
.
write
(
" <thead>
\n
"
)
headerRow
=
tblRow
(
len
(
columns
),
{
"align"
:
"center"
,
"valign"
:
"top"
,
"bold"
:
True
,
"header"
:
True
})
headerRow
.
cells
=
columns
header_rows
=
[
headerRow
]
header_rows
.
extend
([
row
for
row
in
self
.
rows
if
self
.
getValue
(
"header"
)])
last_row
=
header_rows
[
len
(
header_rows
)
-
1
]
for
row
in
header_rows
:
out
.
write
(
" <tr>
\n
"
)
...
...
@@ -353,7 +359,12 @@ class table(object):
attr
+=
" align=
\"
%s
\"
"
%
align
if
valign
:
attr
+=
" valign=
\"
%s
\"
"
%
valign
out
.
write
(
" <th%s>
\n
"
%
attr
)
css
=
""
if
embeedcss
:
css
=
" style=
\"
border:none;color:#003399;font-size:16px;font-weight:normal;white-space:nowrap;padding:3px 10px;
\"
"
if
row
==
last_row
:
css
=
css
[:
-
1
]
+
"padding-bottom:5px;
\"
"
out
.
write
(
" <th%s%s>
\n
"
%
(
attr
,
css
))
if
th
is
not
None
:
out
.
write
(
" %s
\n
"
%
htmlEncode
(
th
.
text
))
out
.
write
(
" </th>
\n
"
)
...
...
@@ -399,7 +410,12 @@ class table(object):
rows
[
q
].
cells
[
i
]
=
colspan
if
style
:
attr
+=
" style=
\"
%s
\"
"
%
style
out
.
write
(
" <td%s>
\n
"
%
attr
)
css
=
""
if
embeedcss
:
css
=
" style=
\"
border:none;border-bottom:1px solid #CCCCCC;color:#666699;padding:6px 8px;white-space:nowrap;
\"
"
if
r
==
0
:
css
=
css
[:
-
1
]
+
"border-top:2px solid #6678B1;
\"
"
out
.
write
(
" <td%s%s>
\n
"
%
(
attr
,
css
))
if
th
is
not
None
:
out
.
write
(
" %s
\n
"
%
htmlEncode
(
td
.
text
))
out
.
write
(
" </td>
\n
"
)
...
...
@@ -423,8 +439,8 @@ html, body {font-family: Lucida Console, Courier New, Courier;font-size: 16px;co
.tbl span{display:block;white-space:nowrap;}
.tbl thead tr:last-child th {padding-bottom:5px;}
.tbl tbody tr:first-child td {border-top:2px solid #6678B1;}
.tbl th{color:#003399;font-size:16px;font-weight:normal;white-space:nowrap;padding:3px 10px;}
.tbl td{border-bottom:1px solid #CCCCCC;color:#666699;padding:6px 8px;white-space:nowrap;}
.tbl th{
border:none;
color:#003399;font-size:16px;font-weight:normal;white-space:nowrap;padding:3px 10px;}
.tbl td{border
:none;border
-bottom:1px solid #CCCCCC;color:#666699;padding:6px 8px;white-space:nowrap;}
.tbl tbody tr:hover td{color:#000099;}
.tbl caption{font:italic 16px "Trebuchet MS",Verdana,Arial,Helvetica,sans-serif;padding:0 0 5px;text-align:right;white-space:normal;}
</style>
...
...
@@ -452,7 +468,7 @@ def getStdoutFilename():
def
detectHtmlOutputType
(
requestedType
):
if
requestedType
==
"txt"
:
return
False
elif
requestedType
==
"html"
:
elif
requestedType
in
[
"html"
,
"moinwiki"
]
:
return
True
else
:
if
sys
.
stdout
.
isatty
():
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录