Prhub

#25316 move dead sglang.test files to test/manual

原始 PR 作者 hnyls2002 合并时间 2026-05-15 11:02 文件变更 29 提交数 4 评论 2 代码增减 +0 / -1

执行摘要

将 26 个未使用的测试文件移至 test/manual 目录

PR body 指出:Move 26 unused test/bench/CLI files out of the installed sglang.test package into test/manual/ (which is the existing convention for tests not wired into CI). 目的是清理 sglang.test 包,避免不必要的文件安装,并遵循仓库已有的 test/manual/ 惯例。

该 PR 属于代码库清理,逻辑简单,无需深入审查。适合快速合并。若关注测试目录结构,可了解 test/manual/ 的用途。

讨论亮点

无 reviewer 讨论(0 条 review 评论)。

实现拆解

  1. 识别死文件:通过搜索 test/benchmark/docs/.github/scripts/Makefile 等目录,确认 26 个文件没有任何调用方。
  2. 移动文件:将这些文件从 python/sglang/test/<subdir>/ 移动到 test/manual/<subdir>/,保持原有目录层次结构,例如 python/sglang/test/test_dynamic_grad_mode.pytest/manual/core/test_dynamic_grad_mode.py
  3. 删除空包:删除移动后变空的 python/sglang/test/attention/__init__.pypython/sglang/test/longbench_v2/__init__.py,避免残留空包。
文件 模块 状态 重要度
python/sglang/test/longbench_v2/__init__.py 包清理 removed 3.58
test/manual/core/test_dynamic_grad_mode.py 测试用例 renamed 3.53
test/manual/ascend/disaggregation_utils.py 测试工具 renamed 3.18
test/manual/attention/test_flashattn_backend.py 测试用例 renamed 3.18
python/sglang/test/attention/__init__.py 包清理 removed 3.18

分析完成后,这里会展示 LLM 生成的相对完整源码片段和详细注释。

评论区精华

没有提炼出高价值讨论线程

当前评论区没有形成足够清晰的争议点或结论,后续有更多讨论时会体现在这里。

风险与影响

极低风险。文件已确认无引用,移动仅改变路径,内容未变。若外部脚本或用户直接引用了原路径,会失效;但经 PR 作者验证,仓库内已无引用。这些测试本就不在 CI 中,因此不影响 CI 流程。

  • 用户:安装 sglang 包时不再包含这些死测试,减少包体积,无功能影响。
  • 开发者test/manual/ 目录更加纯净,明确区分接入 CI 的测试(test/registered/)和手动运行测试(test/manual/)。
  • CI:不涉及 CI 配置变更,无影响。
无功能变更

关联 Issue

未识别关联 Issue

当前没有检测到明确关联的 Issue 链接,后续同步到相关引用后会出现在这里。

完整报告

参与讨论