Moved the process cleanup of Script-Bridge-based APIs into TestBase.tearDown()
method where they belong. Also fixed a logic error in maintaining the command
interface flag (runStarted) indicating whether the lldb "run"/"process launch"
command has been issued. It was erroneously cleared.
Modified the test cases to take advantage of the refactoring.
llvm-svn: 112863
diff --git a/lldb/test/bitfields/TestBitfields.py b/lldb/test/bitfields/TestBitfields.py
index 8c5ea0e..42016fe 100644
--- a/lldb/test/bitfields/TestBitfields.py
+++ b/lldb/test/bitfields/TestBitfields.py
@@ -90,6 +90,9 @@
# This does not work, and results in the process stopped at dyld_start?
#process = target.LaunchProcess([''], [''], os.ctermid(), False)
+ self.process = target.GetProcess()
+ self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
+
# The stop reason of the thread should be breakpoint.
thread = target.GetProcess().GetThreadAtIndex(0)
self.assertTrue(thread.GetStopReason() == StopReasonEnum("Breakpoint"),