Adding an assert that the 'continue' request succeeds caused a number of tests to fail. This showed a number of tests that were not specifying if they should be stopped or not at key points in the test. This is likely contributing to these tests being flaky since the debugger is not in the expected state. Additionally, I spent a little time trying to improve the readability of the dap_server.py and lldbdap_testcase.py.
26 lines
825 B
Python
26 lines
825 B
Python
"""
|
|
Test exception behavior in DAP with signal.
|
|
"""
|
|
|
|
from lldbsuite.test.decorators import *
|
|
from lldbsuite.test.lldbtest import *
|
|
import lldbdap_testcase
|
|
|
|
|
|
class TestDAP_exception(lldbdap_testcase.DAPTestCaseBase):
|
|
@skipIfWindows
|
|
def test_stopped_description(self):
|
|
"""
|
|
Test that exception description is shown correctly in stopped
|
|
event.
|
|
"""
|
|
program = self.getBuildArtifact("a.out")
|
|
self.build_and_launch(program)
|
|
self.do_continue()
|
|
|
|
self.assertTrue(self.verify_stop_exception_info("signal SIGABRT"))
|
|
exceptionInfo = self.get_exceptionInfo()
|
|
self.assertEqual(exceptionInfo["breakMode"], "always")
|
|
self.assertEqual(exceptionInfo["description"], "signal SIGABRT")
|
|
self.assertEqual(exceptionInfo["exceptionId"], "signal")
|