Commit edbbc677 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Modified the test HTML output to inline small contents

parent fb13a338
......@@ -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
......
......@@ -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()
......
......@@ -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"/>&nbsp;');
} else {
f.data("url", test.id + "/" + field).text(field);
if (field == "GaudiTest.output_diff") {
f.addClass("auto_show");
}
}
fields.append(f);
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment