Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Michal Mazurek
Gaudi
Commits
edbbc677
Commit
edbbc677
authored
Dec 13, 2011
by
Marco Clemencic
Browse files
Modified the test HTML output to inline small contents
parent
fb13a338
Changes
3
Hide whitespace changes
Inline
Side-by-side
GaudiPolicy/doc/release.notes
View file @
edbbc677
...
...
@@ -12,6 +12,8 @@ package manager: Marco Clemencic
automatically
expanded
if
the
test
is
expanded
.
Currently
it
happens
only
for
"output_diff"
,
but
should
be
enabled
for
other
cases
depending
on
the
causes
.
-
Modified
the
test
HTML
output
to
inline
small
contents
(
e
.
g
.
exit
code
,
times
,
etc
.)
! 2011-12-07 - Marco Clemencic
-
Enforce
the
use
of
Boost
Filesystem
Version
3
also
with
Boost
1.44
,
for
...
...
GaudiPolicy/qmtest_classes/GaudiTest.py
View file @
edbbc677
...
...
@@ -1794,11 +1794,19 @@ class HTMLResultStream(ResultStream):
summary
[
"cause"
]
=
result
.
GetCause
()
summary
[
"fields"
]
=
result
.
keys
()
summary
[
"fields"
].
sort
()
# add inlined data
summary
[
"data"
]
=
{}
for
f
in
summary
[
"fields"
]:
d
=
result
[
f
]
if
d
==
"<pre></pre>"
:
summary
[
"data"
][
f
]
=
"<i>empty</i>"
elif
len
(
d
)
<
40
:
summary
[
"data"
][
f
]
=
d
# Since we miss proper JSON support, I hack a bit
for
f
in
[
"id"
,
"outcome"
,
"cause"
]:
summary
[
f
]
=
str
(
summary
[
f
])
summary
[
"fields"
]
=
map
(
str
,
summary
[
"fields"
])
#
for f in ["id", "outcome", "cause"]:
#
summary[f] = str(summary[f])
#
summary["fields"] = map(str, summary["fields"])
self
.
_summary
.
append
(
summary
)
...
...
@@ -1812,7 +1820,8 @@ class HTMLResultStream(ResultStream):
json
.
dump
(
summary
,
open
(
os
.
path
.
join
(
testOutDir
,
"summary.json"
),
"w"
),
sort_keys
=
True
)
for
f
in
summary
[
"fields"
]:
open
(
os
.
path
.
join
(
testOutDir
,
f
),
"w"
).
write
(
result
[
f
])
if
f
not
in
summary
[
"data"
]:
open
(
os
.
path
.
join
(
testOutDir
,
f
),
"w"
).
write
(
result
[
f
])
self
.
_updateSummary
()
...
...
GaudiPolicy/qmtest_classes/html_report/scripts.js
View file @
edbbc677
...
...
@@ -229,10 +229,16 @@ jQuery.fn.results = function(tests, ignore_fields, fields_order) {
var
fields
=
$
(
"
<ul class='fieldid'/>
"
);
$
.
each
(
field_ids
,
function
(
index
,
field
)
{
var
f
=
$
(
"
<li/>
"
).
data
(
"
url
"
,
test
.
id
+
"
/
"
+
field
)
.
text
(
field
);
if
(
field
==
"
GaudiTest.output_diff
"
)
{
f
.
addClass
(
"
auto_show
"
);
var
f
=
$
(
"
<li class='foldable'/>
"
)
if
(
test
.
data
[
field
])
{
f
.
text
(
field
+
"
:
"
)
.
append
(
test
.
data
[
field
])
.
prepend
(
'
<img src="minus.png"/>
'
);
}
else
{
f
.
data
(
"
url
"
,
test
.
id
+
"
/
"
+
field
).
text
(
field
);
if
(
field
==
"
GaudiTest.output_diff
"
)
{
f
.
addClass
(
"
auto_show
"
);
}
}
fields
.
append
(
f
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment