Skip to content

Commit

Permalink
xls-report.py: make behaviour more intelligent in case of repeated re…
Browse files Browse the repository at this point in the history
…sults
  • Loading branch information
Roman Donchenko committed Jul 4, 2013
1 parent 0732905 commit 2b44172
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/ts/misc/xls-report.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,13 @@ def collect_from(self, xml_path, default_configuration):

for test in run.tests:
test_results = module_tests.setdefault((test.shortName(), test.param()), {})
test_results[configuration] = test.get("gmean") if test.status == 'run' else test.status
new_result = test.get("gmean") if test.status == 'run' else test.status
test_results[configuration] = min(
test_results.get(configuration), new_result,
key=lambda r: (1, r) if isinstance(r, numbers.Number) else
(2,) if r is not None else
(3,)
) # prefer lower result; prefer numbers to errors and errors to nothing

def make_match_func(matchers):
def match_func(properties):
Expand Down

0 comments on commit 2b44172

Please sign in to comment.