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
|
import re
|
||||||
|
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
|
from collections import OrderedDict
|
||||||
from glob import glob
|
from glob import glob
|
||||||
from itertools import ifilter
|
from itertools import ifilter
|
||||||
|
|
||||||
@ -47,16 +48,11 @@ def collect_xml(collection, configuration, xml_fullname):
|
|||||||
xml_fname = os.path.split(xml_fullname)[1]
|
xml_fname = os.path.split(xml_fullname)[1]
|
||||||
module = xml_fname[:xml_fname.index('_')]
|
module = xml_fname[:xml_fname.index('_')]
|
||||||
|
|
||||||
if module not in collection:
|
module_tests = collection.setdefault(module, OrderedDict())
|
||||||
collection[module] = {}
|
|
||||||
|
|
||||||
for test in sorted(parseLogFile(xml_fullname)):
|
for test in sorted(parseLogFile(xml_fullname)):
|
||||||
if test.shortName() not in collection[module]:
|
test_results = module_tests.setdefault((test.shortName(), test.param()), {})
|
||||||
collection[module][test.shortName()] = {}
|
test_results[configuration] = test.get("gmean")
|
||||||
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")
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
arg_parser = ArgumentParser(description='Build an XLS performance report.')
|
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))
|
module_styles = {module: xlwt.easyxf('pattern: pattern solid, fore_color {}'.format(color))
|
||||||
for module, color in module_colors.iteritems()}
|
for module, color in module_colors.iteritems()}
|
||||||
|
|
||||||
for module, tests in collection.iteritems():
|
for module, tests in sorted(collection.iteritems()):
|
||||||
for test, params in tests.iteritems():
|
for ((test, param), configs) in tests.iteritems():
|
||||||
for param, configs in params.iteritems():
|
|
||||||
sheet.write(row, 0, module, module_styles.get(module, xlwt.Style.default_style))
|
sheet.write(row, 0, module, module_styles.get(module, xlwt.Style.default_style))
|
||||||
sheet.write(row, 1, test)
|
sheet.write(row, 1, test)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user