summaryrefslogtreecommitdiff
path: root/script/show_test_time
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2018-10-11 16:04:38 +1300
committerNoel Power <npower@samba.org>2018-10-25 21:45:58 +0200
commitcd5ac17654467531e2dde85a738c5a170277f841 (patch)
treeb34a7dfe49fcad784135e502953dda03b0d59023 /script/show_test_time
parent159fdcb6010020b06e5a55b66c3e72071183152d (diff)
downloadsamba-cd5ac17654467531e2dde85a738c5a170277f841.tar.gz
script/show_test_time: approach python 3 compatibility
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
Diffstat (limited to 'script/show_test_time')
-rwxr-xr-xscript/show_test_time6
1 files changed, 3 insertions, 3 deletions
diff --git a/script/show_test_time b/script/show_test_time
index 81bb7932a4a..a35e2154275 100755
--- a/script/show_test_time
+++ b/script/show_test_time
@@ -1,5 +1,5 @@
#!/usr/bin/python
-
+from __future__ import print_function
import optparse
import os.path
import subprocess
@@ -23,10 +23,10 @@ for l in p.stdout:
durations[name] = float(duration)
if opts.limit:
- print "Top %d tests by run time:" % opts.limit
+ print("Top %d tests by run time:" % opts.limit)
for i, (name, length) in enumerate(sorted(
durations.items(), cmp=lambda (k1,v1), (k2, v2): cmp(v1, v2), reverse=True)):
if opts.limit and i == opts.limit:
break
- print "%d: %s -> %ds" % (i+1, name, length)
+ print("%d: %s -> %ds" % (i+1, name, length))