diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2012-02-23 01:55:22 -0800 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2013-05-08 11:35:04 -0700 |
commit | ba885e6efb359963820d9ee21ac05796cd873120 (patch) | |
tree | b8212d08f9bc743a8113351a4da16d9dcec933c9 /piglit-summary-html.py | |
parent | f53c96f69557891846494541eee55a24737605e3 (diff) |
html: Use CSS for indenting table rows rather than colspan.
Previously, we indented groups of tests by adding 10 columns
of whitespace to the table and adding colspan. This is pretty
ugly; we really should use CSS for things like this.
The new CSS-based approach should work with deeper nesting levels,
and simplifies the tables.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
Diffstat (limited to 'piglit-summary-html.py')
-rwxr-xr-x | piglit-summary-html.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/piglit-summary-html.py b/piglit-summary-html.py index 5d75d5a86..1f5592839 100755 --- a/piglit-summary-html.py +++ b/piglit-summary-html.py @@ -157,7 +157,6 @@ def hrefFromParts(codename, path): return outStr def buildTestSummary(indent, alternate, testsummary): - tenindent = 10 - indent path = testsummary.path name = testsummary.name testruns = "".join([IndexTestTestrun % { @@ -192,8 +191,7 @@ def buildGroupSummaryTestrun(groupresult): def buildGroupSummary(indent, groupsummary, showcurrent): - tenindent = 10 - indent - + indent_inc = 1.75 # em items = '' alternate = 'a' path = groupsummary.path @@ -216,10 +214,10 @@ def buildGroupSummary(indent, groupsummary, showcurrent): child = groupsummary.children[n] if isinstance(child, framework.summary.GroupSummary): items = items + IndexGroupGroup % { - 'group': buildGroupSummary(indent+1, child, showcurrent) + 'group': buildGroupSummary(indent + indent_inc, child, showcurrent) } else: - items = items + buildTestSummary(indent+1, alternate, child) + items = items + buildTestSummary(indent + indent_inc, alternate, child) if alternate == 'a': alternate = 'b' @@ -249,7 +247,7 @@ results is an array containing the top-level results dictionarys. else: return IndexTestrunB % tr.__dict__ - group = buildGroupSummary(1, summary.root, showcurrent) + group = buildGroupSummary(0, summary.root, showcurrent) testruns = "".join([IndexTestrun % tr.__dict__ for tr in summary.testruns]) testrunsb = "".join([testrunb(tr) for tr in summary.testruns]) |