17 Commits

Author SHA1 Message Date
Druzhkov Sergei
9098bffb03
[lldb-dap] Add external terminal support (#146950)
This patch deprecates the `runInTerminal` option in favour of `console`
which allow the user the specify an integrated or external option.
2025-07-11 11:14:59 +01:00
Michael Buch
7fcd2ca2ef [lldb-dap][test] Import skipIfAsan decorator
```
Traceback (most recent call last):
  File "/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/API/dotest.py", line 8, in <module>
    lldbsuite.test.run_suite()
  File "/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/packages/Python/lldbsuite/test/dotest.py", line 1064, in run_suite
    visit("Test", dirpath, filenames)
  File "/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/packages/Python/lldbsuite/test/dotest.py", line 706, in visit
    visit_file(dir, name)
  File "/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/packages/Python/lldbsuite/test/dotest.py", line 649, in visit_file
    module = __import__(base)
             ^^^^^^^^^^^^^^^^
  File "/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/API/tools/lldb-dap/runInTerminal/TestDAP_runInTerminal.py", line 14, in <module>
    class TestDAP_runInTerminal(lldbdap_testcase.DAPTestCaseBase):
  File "/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/API/tools/lldb-dap/runInTerminal/TestDAP_runInTerminal.py", line 29, in TestDAP_runInTerminal
    @skipIfAsan
     ^^^^^^^^^^
NameError: name 'skipIfAsan' is not defined
```
2025-06-25 12:41:20 +01:00
Michael Buch
14e280e44e [lldb-dap][test] Skip TestDAP_runInTerminal/TestDAP_restart_runInTerminal on ASAN
These fail with on the macOS ASAN CI with following error:
```
07:10:31  ======================================================================
07:10:31  FAIL: test_runInTerminalWithObjectEnv (TestDAP_runInTerminal.TestDAP_runInTerminal)
07:10:31     Tests the "runInTerminal" reverse request. It makes sure that the IDE can
07:10:31  ----------------------------------------------------------------------
07:10:31  Traceback (most recent call last):
07:10:31    File "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py", line 149, in wrapper
07:10:31      return func(*args, **kwargs)
07:10:31    File "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/test/API/tools/lldb-dap/runInTerminal/TestDAP_runInTerminal.py", line 83, in test_runInTerminalWithObjectEnv
07:10:31      self.build_and_launch(program, runInTerminal=True, env={"FOO": "BAR"})
07:10:31    File "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py", line 488, in build_and_launch
07:10:31      return self.launch(program, **kwargs)
07:10:31    File "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py", line 470, in launch
07:10:31      self.assertTrue(
07:10:31  AssertionError: False is not true : launch failed (process exited during launch or attach)
07:10:31  Config=arm64-/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-sanitized/lldb-build/bin/clang
```

These fail ever since they were enabled in https://github.com/llvm/llvm-project/pull/144954.

Skip these again when testing with ASAN.
2025-06-25 12:28:53 +01:00
David Spickett
97b8cec789 [lldb][lldb-dap] Skip runInTerminalWithObjectEnv test on Windows
It is failing on our Windows on Arm bot:
AssertionError: False is not true : launch failed (Unimplemented)

Given that all the others are skipped on Windows, I assume this
failure is expected too.
2025-06-25 09:31:06 +00:00
David Spickett
fa5d7c926f [lldb][lldb-dap] Fix runInTerminal test program on Windows 2025-06-24 11:07:45 +00:00
Ebuka Ezike
5c22793ead
[lldb-dap][test] Refactor runInTerminal Tests. (#144954)
Replace `isTestSupported` function with `skipIfBuildType` annotation.

Test that uses the `IsTestSupported` function are no longer run, as the
size of lldb-dap binary is now more than `1mb`.

Update the broken test. 

Fixes #108621  

We could probably check if the test now passes on `linux arm` since it
was disabled because it timed out. I experienced the timeout after
replacing the `IsTestSupported` with `skipIfBuildType`.
2025-06-23 10:32:46 +01:00
Hu Jialun
695d725edf
[lldb-dap] Assorted small fixes for runInTerminal (#140908)
- `CreateRunInTerminalReverseRequest` is passed a `StringMap` by value,
whose keys are owned and deallocated after return.
- Target args are wrongly specified as reverse request (launcher) args.
- Test case error message did not catch up with a0aa5f8.

All runInTerminal tests are passing with this applied.
2025-05-22 20:20:35 -07:00
John Harrison
a417a868cd
[lldb-dap] Enable runInTerminal tests on macOS. (#133824)
These tests are currently filtered on macOS if your on an M1 (or newer)
device. These tests do work on macOS, for me at least on M1 Max with
macOS 15.3.2 and Xcode 16.2.

Enabling them again, but if we have CI problems with them we can keep
them disabled.
2025-03-31 19:50:36 -07:00
Jonas Devlieghere
fb191efa70
[lldb-dap] Adaptor -> Adapter (NFC) (#129110)
Both spellings are considered correct and acceptable, with adapter being
more common in American English. Given that DAP stands for Debug Adapter
Protocol (with an e) let's go with that as the canonical spelling.
2025-02-27 19:56:56 -06:00
David Spickett
b43e003d90
Revert "[lldb][test] Enable TestDAP_runInTerminal on non-x86 architectures" (#111648)
Reverts llvm/llvm-project#111543

https://lab.llvm.org/buildbot/#/builders/18/builds/5140 failed here
again. Clearly there is something different on Arm but I don't know what
it is yet.
2024-10-09 09:55:39 +01:00
David Spickett
de4f2c976f
[lldb][test] Enable TestDAP_runInTerminal on non-x86 architectures (#111543)
I don't see an obvious reason it has to be x86 specific and local
testing on Arm and AArch64 is fine.

Originally disabled in 50337fb933e0f666d34d747a43d46840b3982bf7 in
response to failures apparently caused by
https://reviews.llvm.org/D93951.

Perhaps those still exist but worth trying this and checking I think.
2024-10-09 09:14:48 +01:00
David Spickett
98c9c1a4d2 [lldb][test] Disable new lldb-dap test on non-x86
Guessing that this is missing because it's failing on Arm 32 bit
and every other test has this requirement.
2024-10-08 14:29:08 +00:00
Da-Viper
d4c1789112
Make env and source map dictionaries #95137 (#106919)
Fixes #95137
2024-10-07 12:38:36 -04:00
Pavel Labath
c053ec95f7 [lldb] Fix TestDAP_runInTerminal for #96256
change the expected error msg.
2024-06-24 14:16:24 +02:00
Pavel Labath
fa6377119c
[lldb-dap] Automatically skip lldb-dap tests for remote platforms (#93169)
The don't currently work (and they're also not particularly useful,
since all of the remote stuff happens inside lldb).

This saves us from annotating tests one by one.
2024-05-24 08:52:32 +02:00
Jordan Rupprecht
9c2468821e
[lldb][test] Modernize asserts (#82503)
This uses [teyit](https://pypi.org/project/teyit/) to modernize asserts,
as recommended by the [unittest release
notes](https://docs.python.org/3.12/whatsnew/3.12.html#id3).

For example, `assertTrue(a == b)` is replaced with `assertEqual(a, b)`.
This produces better error messages, e.g. `error: unexpectedly found 1
and 2 to be different` instead of `error: False`.
2024-02-21 13:02:30 -06:00
Jonas Devlieghere
01263c6c6f
[lldb] Rename lldb-vscode to lldb-dap (#69264)
Rename lldb-vscode to lldb-dap. This change is largely mechanical. The
following substitutions cover the majority of the changes in this
commit:

  s/VSCODE/DAP/
  s/VSCode/DAP/
  s/vscode/dap/
  s/g_vsc/g_dap/

Discourse RFC:
https://discourse.llvm.org/t/rfc-rename-lldb-vscode-to-lldb-dap/74075/
2023-10-19 09:48:54 -07:00