Commit cdac77c2 authored by Andrey Kamaev's avatar Andrey Kamaev

Added test group separators to the html version of performance report.

parent 7bf091cd
...@@ -124,14 +124,24 @@ if __name__ == "__main__": ...@@ -124,14 +124,24 @@ if __name__ == "__main__":
i += 1 i += 1
# rows # rows
prevGroupName = None
needNewRow = True needNewRow = True
lastRow = None
for name in sorted(test_cases.iterkeys(), key=alphanum_keyselector): for name in sorted(test_cases.iterkeys(), key=alphanum_keyselector):
cases = test_cases[name] cases = test_cases[name]
if needNewRow: if needNewRow:
tbl.newRow() lastRow = tbl.newRow()
if not options.showall: if not options.showall:
needNewRow = False needNewRow = False
tbl.newCell("name", name) tbl.newCell("name", name)
groupName = next(c for c in cases if c).shortName()
if groupName != prevGroupName:
prop = lastRow.props.get("cssclass", "")
if "firstingroup" not in prop:
lastRow.props["cssclass"] = prop + " firstingroup"
prevGroupName = groupName
for i in range(setsCount): for i in range(setsCount):
case = cases[i] case = cases[i]
if case is None: if case is None:
......
...@@ -44,7 +44,8 @@ class table(object): ...@@ -44,7 +44,8 @@ class table(object):
self.rows.append(tblRow(len(self.columns), properties)) self.rows.append(tblRow(len(self.columns), properties))
else: else:
self.rows[ridx + 1].props = properties self.rows[ridx + 1].props = properties
self.ridx += 1 self.ridx += 1
return self.rows[self.ridx]
def trimLastRow(self): def trimLastRow(self):
if self.rows: if self.rows:
...@@ -377,8 +378,12 @@ class table(object): ...@@ -377,8 +378,12 @@ class table(object):
rows = [row for row in self.rows if not self.getValue("header")] rows = [row for row in self.rows if not self.getValue("header")]
for r in range(len(rows)): for r in range(len(rows)):
row = rows[r] row = rows[r]
out.write(" <tr>\n") rowattr = ""
cssclass = self.getValue("cssclass", row)
if cssclass:
rowattr += " class=\"%s\"" % cssclass
out.write(" <tr%s>\n" % (rowattr))
i = 0 i = 0
while i < len(row.cells): while i < len(row.cells):
column = columns[i] column = columns[i]
...@@ -441,11 +446,12 @@ html, body {font-family: Lucida Console, Courier New, Courier;font-size: 16px;co ...@@ -441,11 +446,12 @@ html, body {font-family: Lucida Console, Courier New, Courier;font-size: 16px;co
.tbl{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;} .tbl{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;}
.tbl span{display:block;white-space:nowrap;} .tbl span{display:block;white-space:nowrap;}
.tbl thead tr:last-child th {padding-bottom:5px;} .tbl thead tr:last-child th {padding-bottom:5px;}
.tbl tbody tr:first-child td {border-top:2px solid #6678B1;} .tbl tbody tr:first-child td {border-top:3px solid #6678B1;}
.tbl th{border:none;color:#003399;font-size:16px;font-weight:normal;white-space:nowrap;padding:3px 10px;} .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 td{border:none;border-bottom:1px solid #CCCCCC;color:#666699;padding:6px 8px;white-space:nowrap;}
.tbl tbody tr:hover td{color:#000099;} .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;} .tbl caption{font:italic 16px "Trebuchet MS",Verdana,Arial,Helvetica,sans-serif;padding:0 0 5px;text-align:right;white-space:normal;}
.firstingroup {border-top:2px solid #6678B1;}
</style> </style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
......
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