Skip to content
Snippets Groups Projects

Make prinout of differences in Counter, 1DHistograms, and 1DProfiles deterministic

Merged Christoph Hasse requested to merge chasse_sorted_counters into master
All threads resolved!
1 file
+ 8
4
Compare changes
  • Side-by-side
  • Inline
@@ -524,12 +524,15 @@ class LHCbTest(GaudiTesting.QMTTest.QMTTest):
msg += 'Different set of algorithms in ' + comp_type + '\n'
if refAlgoNames.difference(newAlgoNames):
msg += ' Missing : ' + ', '.join(
refAlgoNames.difference(newAlgoNames)) + '\n'
# sorting to make prinout stable across multiple runs
sorted(refAlgoNames.difference(newAlgoNames))) + '\n'
if newAlgoNames.difference(refAlgoNames):
msg += ' Extra : ' + ', '.join(
newAlgoNames.difference(refAlgoNames)) + '\n'
# sorting to make prinout stable across multiple runs
sorted(newAlgoNames.difference(refAlgoNames))) + '\n'
causes.append("Different set of algorithms in " + comp_type)
for algoName in refAlgoNames.intersection(newAlgoNames):
# sorting to make prinout stable across multiple runs
for algoName in sorted(refAlgoNames.intersection(newAlgoNames)):
onlyref, onlystdout, counterPairs = self._compareCutSets(
set(refCounters[algoName]), set(newCounters[algoName]))
if onlyref or onlystdout:
@@ -544,7 +547,8 @@ class LHCbTest(GaudiTesting.QMTTest.QMTTest):
msg += ' ' + comp_type + ' in stdout and not in ref : %s\n' % str(
sorted(list(onlystdout)))
headerPrinted = False
for counterNameRef, counterNameStdout in counterPairs:
# sorting to make prinout stable across multiple runs
for counterNameRef, counterNameStdout in sorted(counterPairs):
# floating point comparison precision
if not self._compareCounterLine(
refCounters[algoName][counterNameRef],
Loading