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 10class TestCase(TestBase): 11 12 mydir = TestBase.compute_mydir(__file__) 13 14 @no_debug_info_test 15 @skipUnlessDarwin 16 @skipIfOutOfTreeDebugserver 17 def test_abort(self): 18 self.build() 19 target = self.dbg.CreateTarget(self.getBuildArtifact("a.out")) 20 process = target.LaunchSimple(None, None, None) 21 # Continue until process is terminated. 22 process.Continue() 23 # Test for the abort signal code. 24 self.assertEqual(process.GetExitStatus(), 6) 25 # Test for the exit code description. 26 self.assertEqual(process.GetExitDescription(), 27 "Terminated due to signal 6") 28