diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2010-08-05 21:23:45 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2010-08-05 21:23:45 +0000 |
| commit | a21249597e021c197b0e9e4a59490a4159e82f2e (patch) | |
| tree | 90e76fc40d58ff6b3a26612012075ac3f6615129 /lldb/test/command_source | |
| parent | f03cdc5d278540a4407402d7cb784837727cf8a2 (diff) | |
| download | bcm5719-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/command_source')
| -rw-r--r-- | lldb/test/command_source/TestCommandSource.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/test/command_source/TestCommandSource.py b/lldb/test/command_source/TestCommandSource.py index 59a97e55c21..23e5815db7c 100644 --- a/lldb/test/command_source/TestCommandSource.py +++ b/lldb/test/command_source/TestCommandSource.py @@ -30,6 +30,7 @@ class TestCommandSource(lldbtest.TestBase): if __name__ == '__main__': + import atexit lldb.SBDebugger.Initialize() + atexit.register(lambda: lldb.SBDebugger.Terminate()) unittest.main() - lldb.SBDebugger.Terminate() |

