[Lldb-commits] [lldb] r129936 - in /lldb/trunk/test: abbreviation_tests/TestAbbreviations.py class_types/TestClassTypesDisassembly.py dotest.py
Johnny Chen
johnny.chen at apple.com
Thu Apr 21 13:48:33 PDT 2011
Author: johnny
Date: Thu Apr 21 15:48:32 2011
New Revision: 129936
URL: http://llvm.org/viewvc/llvm-project?rev=129936&view=rev
Log:
Use self.TraceOn() API.
Modified:
lldb/trunk/test/abbreviation_tests/TestAbbreviations.py
lldb/trunk/test/class_types/TestClassTypesDisassembly.py
lldb/trunk/test/dotest.py
Modified: lldb/trunk/test/abbreviation_tests/TestAbbreviations.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/abbreviation_tests/TestAbbreviations.py?rev=129936&r1=129935&r2=129936&view=diff
==============================================================================
--- lldb/trunk/test/abbreviation_tests/TestAbbreviations.py (original)
+++ lldb/trunk/test/abbreviation_tests/TestAbbreviations.py Thu Apr 21 15:48:32 2011
@@ -57,6 +57,15 @@
self.expect("set sh prompt",
startstr = 'prompt (string) = "(lldb) "')
+ # 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'''sc print "\n\n\tHello!\n"''')
Modified: lldb/trunk/test/class_types/TestClassTypesDisassembly.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/class_types/TestClassTypesDisassembly.py?rev=129936&r1=129935&r2=129936&view=diff
==============================================================================
--- lldb/trunk/test/class_types/TestClassTypesDisassembly.py (original)
+++ lldb/trunk/test/class_types/TestClassTypesDisassembly.py Thu Apr 21 15:48:32 2011
@@ -97,8 +97,9 @@
frame = thread.GetFrameAtIndex(i)
function = frame.GetFunction()
# Print the function header.
- print
- print function
+ if self.traceOn():
+ print
+ print function
if function.IsValid():
# Get all instructions for this function and print them out.
insts = function.GetInstructions(target)
Modified: lldb/trunk/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=129936&r1=129935&r2=129936&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Thu Apr 21 15:48:32 2011
@@ -181,8 +181,8 @@
-s : specify the name of the dir created to store the session files of tests
with errored or failed status; if not specified, the test driver uses the
timestamp as the session dir name
--t : trace lldb command execution and result
--v : do verbose mode of unittest framework
+-t : turn on tracing of lldb command and other detailed test executions
+-v : do verbose mode of unittest framework (print out each test case invocation)
-w : insert some wait time (currently 0.5 sec) between consecutive test cases
-# : Repeat the test suite for a specified number of times
More information about the lldb-commits
mailing list