Skip to content

Commit

Permalink
etc: py3 compat for check-summary.py
Browse files Browse the repository at this point in the history
  • Loading branch information
richo committed May 24, 2015
1 parent 6bcdd9e commit 24bae2e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/etc/check-summary.py
Expand Up @@ -34,7 +34,7 @@ def summarise(fname):
summaries.append((fname, summary))

def count(t):
return sum(map(lambda (f, s): len(s.get(t, [])), summaries))
return sum(map(lambda f: len(f[1].get(t, [])), summaries))

logfiles = sys.argv[1:]
for files in map(glob.glob, logfiles):
Expand All @@ -43,15 +43,15 @@ def count(t):
failed = count('failed')
ignored = count('ignored')
measured = count('bench')
print "summary of %d test runs: %d passed; %d failed; %d ignored; %d measured" % \
(len(logfiles), ok, failed, ignored, measured)
print ""
print("summary of %d test runs: %d passed; %d failed; %d ignored; %d measured" %
(len(logfiles), ok, failed, ignored, measured))
print("")

if failed > 0:
print "failed tests:"
print("failed tests:")
for f, s in summaries:
failures = s.get('failed', [])
if len(failures) > 0:
print " %s:" % (f)
print(" %s:" % (f))
for test in failures:
print " %s" % (test)
print(" %s" % (test))

0 comments on commit 24bae2e

Please sign in to comment.