[Lldb-commits] [lldb] r110719 - /lldb/trunk/test/dotest.py
Johnny Chen
johnny.chen at apple.com
Tue Aug 10 13:23:56 PDT 2010
Author: johnny
Date: Tue Aug 10 15:23:55 2010
New Revision: 110719
URL: http://llvm.org/viewvc/llvm-project?rev=110719&view=rev
Log:
Call lldb.SBDebugger.Terminate() at the end of test suite run through the atexit
handler similar to what's happening for the individual test case run.
Modified:
lldb/trunk/test/dotest.py
Modified: lldb/trunk/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=110719&r1=110718&r2=110719&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Tue Aug 10 15:23:55 2010
@@ -164,8 +164,9 @@
# For the time being, let's bracket the test runner within the
# lldb.SBDebugger.Initialize()/Terminate() pair.
-import lldb
+import lldb, atexit
lldb.SBDebugger.Initialize()
+atexit.register(lambda: lldb.SBDebugger.Terminate())
# Create a singleton SBDebugger in the lldb namespace.
lldb.DBG = lldb.SBDebugger.Create()
@@ -184,8 +185,7 @@
unittest2.signals.installHandler()
# Invoke the default TextTestRunner to run the test suite.
-unittest2.TextTestRunner(verbosity=verbose).run(suite)
+result = unittest2.TextTestRunner(verbosity=verbose).run(suite)
-# Add some delay before calling SBDebugger.Terminate().
-time.sleep(1)
-lldb.SBDebugger.Terminate()
+# Exiting.
+sys.exit(not result.wasSuccessful)
More information about the lldb-commits
mailing list