1""" 2Tests the exit code/description coming from the debugserver. 3""" 4 5import lldb 6from lldbsuite.test.decorators import * 7from lldbsuite.test.lldbtest import * 8from lldbsuite.test import lldbutil 9 10 11class TestCase(TestBase): 12 @no_debug_info_test 13 @skipUnlessDarwin 14 @skipIfOutOfTreeDebugserver 15 def test_abort(self): 16 self.build() 17 target = self.dbg.CreateTarget(self.getBuildArtifact("a.out")) 18 process = target.LaunchSimple(None, None, None) 19 # Continue until process is terminated. 20 process.Continue() 21 # Test for the abort signal code. 22 self.assertEqual(process.GetExitStatus(), 6) 23 # Test for the exit code description. 24 self.assertEqual(process.GetExitDescription(), "Terminated due to signal 6") 25