Made the order of tests in XLS reports deterministic.
This commit is contained in:
parent
4d7b1b5ede
commit
0f1156bbb6
@ -8,6 +8,7 @@ import os, os.path
|
||||
import re
|
||||
|
||||
from argparse import ArgumentParser
|
||||
from collections import OrderedDict
|
||||
from glob import glob
|
||||
from itertools import ifilter
|
||||
|
||||
@ -47,16 +48,11 @@ def collect_xml(collection, configuration, xml_fullname):
|
||||
xml_fname = os.path.split(xml_fullname)[1]
|
||||
module = xml_fname[:xml_fname.index('_')]
|
||||
|
||||
if module not in collection:
|
||||
collection[module] = {}
|
||||
module_tests = collection.setdefault(module, OrderedDict())
|
||||
|
||||
for test in sorted(parseLogFile(xml_fullname)):
|
||||
if test.shortName() not in collection[module]:
|
||||
collection[module][test.shortName()] = {}
|
||||
if test.param() not in collection[module][test.shortName()]:
|
||||
collection[module][test.shortName()][test.param()] = {}
|
||||
collection[module][test.shortName()][test.param()][configuration] = \
|
||||
test.get("gmean")
|
||||
test_results = module_tests.setdefault((test.shortName(), test.param()), {})
|
||||
test_results[configuration] = test.get("gmean")
|
||||
|
||||
def main():
|
||||
arg_parser = ArgumentParser(description='Build an XLS performance report.')
|
||||
@ -129,9 +125,8 @@ def main():
|
||||
module_styles = {module: xlwt.easyxf('pattern: pattern solid, fore_color {}'.format(color))
|
||||
for module, color in module_colors.iteritems()}
|
||||
|
||||
for module, tests in collection.iteritems():
|
||||
for test, params in tests.iteritems():
|
||||
for param, configs in params.iteritems():
|
||||
for module, tests in sorted(collection.iteritems()):
|
||||
for ((test, param), configs) in tests.iteritems():
|
||||
sheet.write(row, 0, module, module_styles.get(module, xlwt.Style.default_style))
|
||||
sheet.write(row, 1, test)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user