summaryrefslogtreecommitdiffstats
path: root/lldb/test/source-manager/TestSourceManager.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/source-manager/TestSourceManager.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/source-manager/TestSourceManager.py')
-rw-r--r--lldb/test/source-manager/TestSourceManager.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/lldb/test/source-manager/TestSourceManager.py b/lldb/test/source-manager/TestSourceManager.py
index ea6499ea669..9beaacefa62 100644
--- a/lldb/test/source-manager/TestSourceManager.py
+++ b/lldb/test/source-manager/TestSourceManager.py
@@ -9,6 +9,8 @@ o test_modify_source_file_while_debugging:
Test the caching mechanism of the source manager.
"""
+from __future__ import print_function
+
import lldb_shared
import lldb
@@ -135,24 +137,24 @@ class SourceManagerTestCase(TestBase):
with open('main.c', 'r') as f:
original_content = f.read()
if self.TraceOn():
- print "original content:", original_content
+ print("original content:", original_content)
# Modify the in-memory copy of the original source code.
new_content = original_content.replace('Hello world', 'Hello lldb', 1)
# This is the function to restore the original content.
def restore_file():
- #print "os.path.getmtime() before restore:", os.path.getmtime('main.c')
+ #print("os.path.getmtime() before restore:", os.path.getmtime('main.c'))
time.sleep(1)
with open('main.c', 'wb') as f:
f.write(original_content)
if self.TraceOn():
with open('main.c', 'r') as f:
- print "content restored to:", f.read()
+ print("content restored to:", f.read())
# Touch the file just to be sure.
os.utime('main.c', None)
if self.TraceOn():
- print "os.path.getmtime() after restore:", os.path.getmtime('main.c')
+ print("os.path.getmtime() after restore:", os.path.getmtime('main.c'))
@@ -161,8 +163,8 @@ class SourceManagerTestCase(TestBase):
time.sleep(1)
f.write(new_content)
if self.TraceOn():
- print "new content:", new_content
- print "os.path.getmtime() after writing new content:", os.path.getmtime('main.c')
+ print("new content:", new_content)
+ print("os.path.getmtime() after writing new content:", os.path.getmtime('main.c'))
# Add teardown hook to restore the file to the original content.
self.addTearDownHook(restore_file)
OpenPOWER on IntegriCloud