diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2010-12-21 05:43:37 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2010-12-21 05:43:37 +0000 |
| commit | 4f8caab924487fe51eb2bff87edb30c75a8223d2 (patch) | |
| tree | 79df045cf5b669666ad12ce914b2e6ac096ae219 /lldb/test/python_api | |
| parent | 6b6e08228c336e31327aac3acd409d49edcae614 (diff) | |
| download | bcm5719-llvm-4f8caab924487fe51eb2bff87edb30c75a8223d2.tar.gz bcm5719-llvm-4f8caab924487fe51eb2bff87edb30c75a8223d2.zip | |
Set the debugger to asynchronous mode before using the Python API call to kill
the process. The custom thread started before this point is running in a loop
waiting for events to come.
llvm-svn: 122316
Diffstat (limited to 'lldb/test/python_api')
| -rw-r--r-- | lldb/test/python_api/event/TestEvents.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lldb/test/python_api/event/TestEvents.py b/lldb/test/python_api/event/TestEvents.py index 70e33eae09a..77de0f93ce5 100644 --- a/lldb/test/python_api/event/TestEvents.py +++ b/lldb/test/python_api/event/TestEvents.py @@ -85,11 +85,20 @@ class EventAPITestCase(TestBase): my_thread = MyListeningThread() my_thread.start() - # Use Python API to continue the process. The listening thread should be + # Set the debugger to be in asynchronous mode since our listening thread + # is waiting for events to come. + self.dbg.SetAsync(True) + + # Use Python API to kill the process. The listening thread should be # able to receive a state changed event. - self.process.Continue() + self.process.Kill() + # Wait until the 'MyListeningThread' terminates. my_thread.join() + + # Restore the original synchronous mode. + self.dbg.SetAsync(False) + self.assertTrue(event.IsValid()) |

