summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/test/alias_tests/TestAliases.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/test/alias_tests/TestAliases.py b/lldb/test/alias_tests/TestAliases.py
index ccc27f77940..b863e80e834 100644
--- a/lldb/test/alias_tests/TestAliases.py
+++ b/lldb/test/alias_tests/TestAliases.py
@@ -29,6 +29,16 @@ class AliasTestCase(TestBase):
self.runCmd (r'''command alias hello expr (int) printf ("\n\nHello, anybody!\n\n")''')
self.runCmd ("command alias python script")
+
+ # We don't want to display the stdout if not in TraceOn() mode.
+ if not self.TraceOn():
+ old_stdout = sys.stdout
+ session = StringIO.StringIO()
+ sys.stdout = session
+ def restore_stdout():
+ sys.stdout = old_stdout
+ self.addTearDownHook(restore_stdout)
+
self.runCmd (r'''python print "\n\n\nWhoopee!\n\n\n"''')
# self.expect (r'''python print "\n\n\nWhoopee!\n\n\n"''',
# substrs = [ "Whoopee!" ])
OpenPOWER on IntegriCloud