diff --git a/GaudiPolicy/doc/release.notes b/GaudiPolicy/doc/release.notes index 872e6c1083eb753ba3899f96c383819c01c2f4cd..d7060d5881476c09b2baf3a6c4b7da9c4d0bc004 100644 --- a/GaudiPolicy/doc/release.notes +++ b/GaudiPolicy/doc/release.notes @@ -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 diff --git a/GaudiPolicy/qmtest_classes/GaudiTest.py b/GaudiPolicy/qmtest_classes/GaudiTest.py index 4d3394aaeb80d8277b8a8a046686bd38e01dc3eb..139c2899bf1c655ccb45f8833b378feda7308a1b 100644 --- a/GaudiPolicy/qmtest_classes/GaudiTest.py +++ b/GaudiPolicy/qmtest_classes/GaudiTest.py @@ -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() diff --git a/GaudiPolicy/qmtest_classes/html_report/scripts.js b/GaudiPolicy/qmtest_classes/html_report/scripts.js index f3a3254bfa6604b416c5f781f2f4363cc03584ec..c4d1523c3554e0dfdd66e261d3e59a34461d65e6 100644 --- a/GaudiPolicy/qmtest_classes/html_report/scripts.js +++ b/GaudiPolicy/qmtest_classes/html_report/scripts.js @@ -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); });