fix(preflight): Windows 下测试命令分块运行,规避 cmd.exe 命令行长度上限 - #168
Merged
Conversation
preflight.sh 用 $(find ...) 显式拼出 171 个测试文件路径(约 7935 字符), 加上命令前缀超过 cmd.exe 对 .bat 的 8191 字符上限,报"命令语法不正确"、 exit 255,导致 pre-push 守门在 Windows 上必然失败、push 被拦。 改为 find -print0 | xargs -0 -r -n 45 分块运行 flutter test,文件集与 排除标签不变(test/golden/* 仍按路径排除 + --exclude-tags golden/perf), 与 ci.yml Test job 参数一致。验证:analyze 通过 + 4 chunk 全绿(0 失败)。 Task scope: ROADMAP repo-governance Co-Authored-By: AtomCode (deepseek-v4-flash) <noreply@atomgit.com>
|
Claude finished @Thy985's task in 26s —— View job [Level 0] 快速检查目的 ✅ 清晰:解决 Windows cmd.exe 对 验证结果
规范:注释充分说明 Windows 兼容原因与字符上限来源;不破坏现有 最终结论:✅ 可以合并(无 Bug、无规范问题、与 PR 描述一致) |
This was referenced Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(preflight): Windows 下测试命令分块运行,规避 cmd.exe 命令行长度上限
关联 issue
改动说明
What:
flutter_app/tool/preflight.sh的测试命令由单次flutter test $(find ...)改为find -print0 | xargs -0 -r -n 45分块运行。Why:
$(find ...)显式拼出 171 个测试文件路径(约 7935 字符),加上命令前缀超过 cmd.exe 对.bat的 8191 字符命令行上限命令语法不正确、exit 255,测试步骤无法启动,pre-push 守门必然失败、push 被拦兼容性
test/golden/*仍按路径排除 +--exclude-tags golden/perf,与 ci.yml Test job 参数一致测试方式
cd flutter_app && bash tool/preflight.shfind test -name "*_test.dart" ! -path "test/golden/*" -print0 | xargs -0 -r -n 45 flutter test --no-pub --exclude-tags golden --exclude-tags perf --reporter compact→ 4 chunk 全绿(0 失败)是否影响公共 API
是否更新文档
自检清单(AGENTS.md §5.3)
flutter_app/tool/preflight.sh1 文件)flutter analyze --no-fatal-infos --fatal-warnings通过flutter test(排除 golden/perf)通过 —— 分块验证 4 chunk 全绿(0 失败)flutter build apk --debug/flutter build web(未跑,纯工具脚本改动不影响构建)Task scope
ROADMAP repo-governance