llvm-project/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_basic.py
Charles Zablit 6a365b004d
[lldb-dap][windows] fix lldb-dap's self.get_stdout() method (#181813)
`DAPTestCaseBase.get_stdout()` was originally not supported on Windows
due to the lack of ConPTY support.
https://github.com/llvm/llvm-project/pull/168729 fixed that by
implenenting the ConPTY support. It was partly reverted in
https://github.com/llvm/llvm-project/pull/177610 due to hard to
reproduce test failures.

The tests are now fixed (see the 2 patches below) and removing the check
for `GetFlags().Test(lldb::eLaunchFlagLaunchInTTY);` is the last step to
re-enabling ConPTY support.

This patch requires:
- https://github.com/llvm/llvm-project/pull/181811
- https://github.com/llvm/llvm-project/pull/181809

Fixes https://github.com/llvm/llvm-project/issues/137599.

rdar://168932366
2026-02-18 17:05:29 +00:00

24 lines
765 B
Python

"""
Test lldb-dap launch request.
"""
from lldbsuite.test.decorators import expectedFailureWindows
import lldbdap_testcase
class TestDAP_launch_basic(lldbdap_testcase.DAPTestCaseBase):
"""
Tests the default launch of a simple program. No arguments,
environment, or anything else is specified.
"""
def test(self):
program = self.getBuildArtifact("a.out")
self.build_and_launch(program)
self.continue_to_exit()
# Now get the STDOUT and verify our program argument is correct
output = self.get_stdout()
self.assertTrue(output and len(output) > 0, "expect program output")
lines = output.splitlines()
self.assertIn(program, lines[0], "make sure program path is in first argument")