summaryrefslogtreecommitdiffstats
path: root/lldb/test/global_variables/TestGlobalVariables.py
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2010-08-05 21:23:45 +0000
committerJohnny Chen <johnny.chen@apple.com>2010-08-05 21:23:45 +0000
commita21249597e021c197b0e9e4a59490a4159e82f2e (patch)
tree90e76fc40d58ff6b3a26612012075ac3f6615129 /lldb/test/global_variables/TestGlobalVariables.py
parentf03cdc5d278540a4407402d7cb784837727cf8a2 (diff)
downloadbcm5719-llvm-a21249597e021c197b0e9e4a59490a4159e82f2e.tar.gz
bcm5719-llvm-a21249597e021c197b0e9e4a59490a4159e82f2e.zip
When running a single test case, lldb.SBDebugger.Terminate() is not being called
because unittest.main() calls sys.exit() before returning. Fixed by registering an exit handler for this situation. llvm-svn: 110379
Diffstat (limited to 'lldb/test/global_variables/TestGlobalVariables.py')
-rw-r--r--lldb/test/global_variables/TestGlobalVariables.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/test/global_variables/TestGlobalVariables.py b/lldb/test/global_variables/TestGlobalVariables.py
index 2701df98f8d..36ddf652576 100644
--- a/lldb/test/global_variables/TestGlobalVariables.py
+++ b/lldb/test/global_variables/TestGlobalVariables.py
@@ -54,6 +54,7 @@ class TestGlobalVariables(lldbtest.TestBase):
if __name__ == '__main__':
+ import atexit
lldb.SBDebugger.Initialize()
+ atexit.register(lambda: lldb.SBDebugger.Terminate())
unittest.main()
- lldb.SBDebugger.Terminate()
OpenPOWER on IntegriCloud