[Lldb-commits] [lldb] r111319 - in /lldb/trunk/test: README-TestSuite dotest.py
Johnny Chen
johnny.chen at apple.com
Tue Aug 17 16:00:13 PDT 2010
Author: johnny
Date: Tue Aug 17 18:00:13 2010
New Revision: 111319
URL: http://llvm.org/viewvc/llvm-project?rev=111319&view=rev
Log:
Write out the informational message about the total number of test cases to be
run to stderr, instead of stdout. The same as what the unittest framework uses.
Modified:
lldb/trunk/test/README-TestSuite
lldb/trunk/test/dotest.py
Modified: lldb/trunk/test/README-TestSuite
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/README-TestSuite?rev=111319&r1=111318&r2=111319&view=diff
==============================================================================
--- lldb/trunk/test/README-TestSuite (original)
+++ lldb/trunk/test/README-TestSuite Tue Aug 17 18:00:13 2010
@@ -11,6 +11,15 @@
directory in order to be recognized by 'dotest.py' test driver as a module
which implements a test case, namely, Test*.py.
+ Some example usages:
+
+ 1. ./dotest.py -v . 2> ~/Developer/Log/lldbtest.log0
+ This runs the test suite and directs the run log to a file.
+
+ 2. LLDB_LOG=/tmp/lldb.log GDB_REMOTE_LOG=/tmp/gdb-remote.log ./dotest.py -v . 2> ~/Developer/Log/lldbtest.log
+ This runs the test suite, with logging turned on for the lldb as well as
+ the process.gdb-remote channels and directs the run log to a file.
+
o lldbtest.py
Provides an abstract base class of lldb test case named 'TestVase', which in
Modified: lldb/trunk/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=111319&r1=111318&r2=111319&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Tue Aug 17 18:00:13 2010
@@ -50,8 +50,8 @@
# Separator string.
separator = '-' * 70
-# Decorated sys.stdout.
-out = _WritelnDecorator(sys.stdout)
+# Decorated sys.stderr for our consumption.
+err = _WritelnDecorator(sys.stderr)
def usage():
@@ -157,10 +157,10 @@
os.path.walk(testdir, visit, 'Test')
# Now that we have loaded all the test cases, run the whole test suite.
-out.writeln(separator)
-out.writeln("Collected %d test%s" % (suite.countTestCases(),
+err.writeln(separator)
+err.writeln("Collected %d test%s" % (suite.countTestCases(),
suite.countTestCases() != 1 and "s" or ""))
-out.writeln()
+err.writeln()
# For the time being, let's bracket the test runner within the
# lldb.SBDebugger.Initialize()/Terminate() pair.
More information about the lldb-commits
mailing list