diff options
| author | Med Ismail Bennani <medismail.bennani@gmail.com> | 2022-02-25 20:50:05 -0800 |
|---|---|---|
| committer | Med Ismail Bennani <medismail.bennani@gmail.com> | 2022-03-04 13:35:07 -0800 |
| commit | 2a29c3f72e8d93385be83bd24a993c3bb57ac181 (patch) | |
| tree | e631188fd4d881b8e97b7daa6a71284ba07693bd /lldb/test/API/python_api | |
| parent | 22b6e8173cb258fae5a7d332b6f9eb19e9ddf86f (diff) | |
| download | llvm-2a29c3f72e8d93385be83bd24a993c3bb57ac181.zip llvm-2a29c3f72e8d93385be83bd24a993c3bb57ac181.tar.gz llvm-2a29c3f72e8d93385be83bd24a993c3bb57ac181.tar.bz2 | |
[lldb/test] Re-enable TestEvents.py on Darwin and fix crashes
This patch re-enables TestEvents.py on Darwin and fixes some crashes
that were happening due to an undefined method.
I ran it 100 times locally with the following command and it passed
every the time:
```
for i in {1..100}; do print $i/100; ./bin/lldb-dotest -p TestEvents.py 2>&1 | rg PASSED; if [ "$?" -eq "1" ]; then break; fi; done
```
Let's see if it still fails non-deterministically on the bots and
eventually also re-enable it on linux.
rdar://37037235
Differential Revision: https://reviews.llvm.org/D120607
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Diffstat (limited to 'lldb/test/API/python_api')
| -rw-r--r-- | lldb/test/API/python_api/event/TestEvents.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lldb/test/API/python_api/event/TestEvents.py b/lldb/test/API/python_api/event/TestEvents.py index 95cf5b2..33650c4 100644 --- a/lldb/test/API/python_api/event/TestEvents.py +++ b/lldb/test/API/python_api/event/TestEvents.py @@ -13,7 +13,6 @@ from lldbsuite.test import lldbutil @skipIfLinux # llvm.org/pr25924, sometimes generating SIGSEGV -@skipIfDarwin class EventAPITestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @@ -171,9 +170,9 @@ class EventAPITestCase(TestBase): # Let's only try at most 3 times to retrieve any kind of event. while not count > 3: if listener.WaitForEvent(5, event): - self.trace("Got a valid event:", event) - self.trace("Event data flavor:", event.GetDataFlavor()) - self.trace("Event type:", lldbutil.state_type_to_str(event.GetType())) + self.context.trace("Got a valid event:", event) + self.context.trace("Event data flavor:", event.GetDataFlavor()) + self.context.trace("Event type:", lldbutil.state_type_to_str(event.GetType())) listener.Clear() return count = count + 1 @@ -187,6 +186,7 @@ class EventAPITestCase(TestBase): # Let's start the listening thread to retrieve the event. my_thread = MyListeningThread() + my_thread.context = self my_thread.start() # Wait until the 'MyListeningThread' terminates. @@ -256,7 +256,7 @@ class EventAPITestCase(TestBase): class MyListeningThread(threading.Thread): def run(self): - self.trace("Running MyListeningThread:", self) + self.context.trace("Running MyListeningThread:", self) # Regular expression pattern for the event description. pattern = re.compile("data = {.*, state = (.*)}$") @@ -266,7 +266,7 @@ class EventAPITestCase(TestBase): while True: if listener.WaitForEvent(5, event): desc = lldbutil.get_description(event) - self.trace("Event description:", desc) + self.context.trace("Event description:", desc) match = pattern.search(desc) if not match: break |
