@@ -162,9 +162,14 @@ def test_launch_simple(self):
162
162
self .setTearDownCleanup (dictionary = d )
163
163
target = self .create_simple_target ('b.out' )
164
164
165
+ # Set the debugger to synchronous mode so we only continue after the
166
+ # process has exited.
167
+ self .dbg .SetAsync (False )
168
+
165
169
process = target .LaunchSimple (
166
170
['foo' , 'bar' ], ['baz' ], self .get_process_working_directory ())
167
171
self .runCmd ("run" )
172
+ self .assertEqual (process .GetState (), lldb .eStateExited )
168
173
output = process .GetSTDOUT (9999 )
169
174
self .assertIn ('arg: foo' , output )
170
175
self .assertIn ('arg: bar' , output )
@@ -175,6 +180,7 @@ def test_launch_simple(self):
175
180
process = target .LaunchSimple (None , None ,
176
181
self .get_process_working_directory ())
177
182
self .runCmd ("run" )
183
+ self .assertEqual (process .GetState (), lldb .eStateExited )
178
184
output = process .GetSTDOUT (9999 )
179
185
self .assertIn ('arg: foo' , output )
180
186
self .assertIn ('env: bar=baz' , output )
@@ -183,6 +189,7 @@ def test_launch_simple(self):
183
189
process = target .LaunchSimple (
184
190
None , None , self .get_process_working_directory ())
185
191
self .runCmd ("run" )
192
+ self .assertEqual (process .GetState (), lldb .eStateExited )
186
193
output = process .GetSTDOUT (9999 )
187
194
self .assertEqual (output , "" )
188
195
0 commit comments