Files
clang-p2996/lldb/test/API/functionalities/reverse-execution/TestReverseContinueNotSupported.py
Jason Molenda c686eeb7fc [lldb] skip ReverseContinue tests on Darwin
This uses lldb-server in gdbserver mode, which requires a ProcessNative
plugin.  Darwin does not have a ProcessNative plugin; it uses
debugserver instead of lldb-server.  Skip these tests.
2024-10-10 16:08:19 -07:00

32 lines
1.1 KiB
Python

import lldb
import unittest
from lldbsuite.test.lldbtest import *
from lldbsuite.test.decorators import *
from lldbsuite.test import lldbutil
class TestReverseContinueNotSupported(TestBase):
NO_DEBUG_INFO_TESTCASE = True
@skipIfDarwin # No Darwin ProcessNative impl for lldb-server
def test_reverse_continue_not_supported(self):
self.build()
exe = self.getBuildArtifact("a.out")
target = self.dbg.CreateTarget(exe)
self.assertTrue(target, VALID_TARGET)
main_bkpt = target.BreakpointCreateByName("main", None)
self.assertTrue(main_bkpt, VALID_BREAKPOINT)
process = target.LaunchSimple(None, None, self.get_process_working_directory())
self.assertTrue(process, PROCESS_IS_VALID)
# This will fail gracefully.
status = process.Continue(lldb.eRunReverse)
self.assertFailure(status, "target does not support reverse-continue")
status = process.Continue()
self.assertSuccess(status)
self.assertState(process.GetState(), lldb.eStateExited)
self.assertEqual(process.GetExitStatus(), 0)