Skip to content

test: 宿主端到端调试测试移到插件仓库 - #5

Draft
xiaoyumuxi wants to merge 1 commit into
mainfrom
test/host-e2e
Draft

xiaoyumuxi wants to merge 1 commit into
mainfrom
test/host-e2e

Conversation

@xiaoyumuxi

Copy link
Copy Markdown
Contributor

关联:1lck/Lithe-IDEA#1915(插件的测试、功能矩阵和翻译只在插件仓库,宿主零依赖)

改动

主仓库在 #1915 删掉了 LLDB 插件的宿主端到端测试。这个 PR 把它接到插件仓库:

  • 宿主端到端测试 e2e/host/desktop/internal/workbench/debug_native_e2e_test.go
    • 来源:主仓库同路径文件(1lck/Lithe-IDEA@b582e206a),内容未改。
    • 测试用 Core 校验 plugin.json,装进临时插件目录,用 clang -g 编译一个 C 程序,经真实 lldb-dap 和 Core 调试引擎启动、命中断点、读取输出。
  • 运行脚本 scripts/e2e-host.mjs 和宿主版本固定文件 e2e/host/lithe-host.json
    • 测试用的是宿主内部(未导出)的测试工具,只能在宿主的 desktop/internal/workbench 包里编译。
    • 脚本把固定的宿主 commit(059d878d4)稀疏检出到 .artifacts/lithe-host(只取 desktop/ 和 scripts/),复制测试,再运行宿主的 scripts/desktop/desktop-go.sh test。
    • LITHE_TEST_DEBUG_PLUGIN_MANIFEST 默认指向本仓库的 io.github.lithe-idea.lldb-debug/plugin.json,所以测的是当前分支的清单。
    • 主仓库不读取插件仓库,依赖方向是插件 → 宿主的某个固定 commit。
  • README 增加“宿主端到端测试”一节,开发目录表加上 scripts/e2e-host.mjs 和 e2e/host/;.gitignore 忽略 .artifacts/。

主仓库的功能矩阵里没有 LLDB 插件的条目,所以这个 PR 不新增功能矩阵。没有改 CI:测试要 clang、lldb-dap 和 Rust 工具链,和在主仓库时一样手动运行。

验证

2026-11-14,macOS arm64:

node scripts/e2e-host.mjs
  • 从空的 .artifacts/lithe-host 开始(检出宿主、构建 Core):TestDebugRealLLDBLaunchTargetAndBreakpoints PASS(0.93s),程序输出 debug-result=42 并以 0 退出。
  • gofmt -l e2e/ 无输出;node scripts/package.mjs 正常,包里不含 e2e/。

评审注意

主仓库按 1lck/Lithe-IDEA#1915 不再保存插件的测试,这里接收
TestDebugRealLLDBLaunchTargetAndBreakpoints:scripts/e2e-host.mjs 把 e2e/host/lithe-host.json
固定的宿主版本检出到 .artifacts/lithe-host 后运行,默认使用本仓库的 plugin.json。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant