brintos

brintos / llvm-project-archived public Read only

0
0
Text · 800 B · 4c454cc Raw
30 lines · python
1# lldb test suite imports2from lldbsuite.test.decorators import *3from lldbsuite.test.lldbtest import TestBase4 5# gdb-remote-specific imports6import lldbgdbserverutils7from gdbremote_testcase import GdbRemoteTestCaseBase8 9 10class TestGdbRemoteExitCode(GdbRemoteTestCaseBase):11    def _test_inferior_exit(self, retval):12        self.build()13 14        procs = self.prep_debug_monitor_and_inferior(15            inferior_args=["retval:%d" % retval]16        )17 18        self.test_sequence.add_log_lines(19            ["read packet: $vCont;c#a8", "send packet: $W{0:02x}#00".format(retval)],20            True,21        )22 23        self.expect_gdbremote_sequence()24 25    def test_inferior_exit_0(self):26        self._test_inferior_exit(0)27 28    def test_inferior_exit_42(self):29        self._test_inferior_exit(42)30