summaryrefslogtreecommitdiffstats
path: root/lldb/test/attic/tester.py
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-10-23 17:04:29 +0000
committerZachary Turner <zturner@google.com>2015-10-23 17:04:29 +0000
commit35d017f0fc38b53e31f1a44d07c3c142f5d3620b (patch)
tree9bb8d7e92d30ed6ea5387993d53a07e8f16a155c /lldb/test/attic/tester.py
parentd43fe0bd39ab70b739123853ebd0c2991512b9d7 (diff)
downloadbcm5719-llvm-35d017f0fc38b53e31f1a44d07c3c142f5d3620b.tar.gz
bcm5719-llvm-35d017f0fc38b53e31f1a44d07c3c142f5d3620b.zip
Add from __future__ import print_function everywhere.
Apparently there were tons of instances I missed last time, I guess I accidentally ran 2to3 non-recursively. This should be every occurrence of a print statement fixed to use a print function as well as from __future__ import print_function being added to every file. After this patch print statements will stop working everywhere in the test suite, and the print function should be used instead. llvm-svn: 251121
Diffstat (limited to 'lldb/test/attic/tester.py')
-rwxr-xr-xlldb/test/attic/tester.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/lldb/test/attic/tester.py b/lldb/test/attic/tester.py
index 3f05fbed25d..34a6ed13c94 100755
--- a/lldb/test/attic/tester.py
+++ b/lldb/test/attic/tester.py
@@ -1,13 +1,15 @@
#!/usr/bin/env python
# -*- coding: utf8 -*-
+from __future__ import print_function
+
import math, os.path, re, sys, time, unittest
def setupSysPath():
testPath = sys.path[0]
rem = re.match("(^.*/)test$", testPath)
if not rem:
- print "This script expects to reside in .../test."
+ print("This script expects to reside in .../test.")
sys.exit(-1)
lldbBasePath = rem.group(1)
lldbDebugPythonPath = "build/Debug/LLDB.framework/Resources/Python"
@@ -18,8 +20,8 @@ def setupSysPath():
if os.path.isfile(lldbReleasePythonPath + "/lldb.py"):
lldbPythonPath = lldbReleasePythonPath
if not lldbPythonPath:
- print "This script requires lldb.py to be in either " + lldbDebugPythonPath,
- print "or" + lldbReleasePythonPath
+ print("This script requires lldb.py to be in either " + lldbDebugPythonPath, end='')
+ print("or" + lldbReleasePythonPath)
sys.exit(-1)
sys.path.append(lldbPythonPath)
@@ -72,8 +74,8 @@ class ExecutionTimes:
sampleVariance += (time - sampleMean) ** 2
sampleVariance /= sampleCount
sampleStandardDeviation = math.sqrt(sampleVariance)
- print key + ": [" + prettyTime(sampleMin) + ", " + prettyTime(sampleMax) + "] ",
- print "µ " + prettyTime(sampleMean) + ", σ " + prettyTime(sampleStandardDeviation)
+ print(key + ": [" + prettyTime(sampleMin) + ", " + prettyTime(sampleMax) + "] ", end='')
+ print("µ " + prettyTime(sampleMean) + ", σ " + prettyTime(sampleStandardDeviation))
m_executionTimes = None
setupSysPath()
@@ -86,7 +88,7 @@ class LLDBTestCase(unittest.TestCase):
debugger.SetAsync(True)
self.m_commandInterpreter = debugger.GetCommandInterpreter()
if not self.m_commandInterpreter:
- print "Couldn't get the command interpreter"
+ print("Couldn't get the command interpreter")
sys.exit(-1)
def runCommand(self, command, component):
res = lldb.SBCommandReturnObject()
@@ -104,7 +106,7 @@ class LLDBTestCase(unittest.TestCase):
class SanityCheckTestCase(LLDBTestCase):
def runTest(self):
ret = self.runCommand("show arch", "show-arch")
- #print ret
+ #print(ret)
def getCategories(self):
return []
OpenPOWER on IntegriCloud