build: 删除 MDK-ARM/build.bat,@build 完全收敛到 keil-build skill
- test/run_all_suites.py 是唯一真正执行它的地方:BUILD_BAT 常量改为 KEIL_BUILD(.dsh/skills/keil-build/scripts/keil_build.py);两处构建点 改传 --timeout(脚本内超时先于 _run 超时触发,超时得 rc=1 + BUILD_FAIL 文案,而不是被 _run 杀掉) - AGENTS.md / keil-build SKILL.md / new-machine-setup SKILL.md:删除 "等价原生入口"口径,改为注明该文件已于 2026-10-10 删除 - 环境与部署 3 篇 / 项目架构总览 / README / MDK-ARM/README / download.bat 注释 / check_mem_numbers.py 提示串:移除 build.bat 引用 - 刻意未改:docs/问题记录/项目审查与优化建议报告.md 的 P2-14 / N-18 (历史审计条目;doc-links 不校验裸文件名,保留不影响门禁) - 验证:keil_build.py --timeout 300 -> BUILD_OK / rc=0; run_all_suites.py --dry-run 正确解析 skill 路径;doc-links 123 文档通过
This commit is contained in:
@@ -53,7 +53,7 @@ from pathlib import Path
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parent.parent
|
||||
CONFIG = REPO_ROOT / "test" / "board" / "test_config.h"
|
||||
BUILD_BAT = REPO_ROOT / "MDK-ARM" / "build.bat"
|
||||
KEIL_BUILD = REPO_ROOT / ".dsh" / "skills" / "keil-build" / "scripts" / "keil_build.py"
|
||||
DOWNLOAD_BAT = REPO_ROOT / "MDK-ARM" / "download.bat"
|
||||
RUN_BOOT = REPO_ROOT / ".dsh" / "skills" / "serial-boot-test" / "scripts" / "run_boot_test.py"
|
||||
|
||||
@@ -147,7 +147,7 @@ def main(argv=None):
|
||||
return 2
|
||||
|
||||
# --check-build 不需要串口/烧录工具,故不强求 run_boot_test.py 存在
|
||||
required = (CONFIG, BUILD_BAT) if args.check_build else (CONFIG, BUILD_BAT, DOWNLOAD_BAT, RUN_BOOT)
|
||||
required = (CONFIG, KEIL_BUILD) if args.check_build else (CONFIG, KEIL_BUILD, DOWNLOAD_BAT, RUN_BOOT)
|
||||
for p in required:
|
||||
if not p.is_file():
|
||||
print("[ERROR] 缺文件:{}".format(p))
|
||||
@@ -157,7 +157,7 @@ def main(argv=None):
|
||||
print("=== 多套件回归编排 ===")
|
||||
print("模式:{}".format(mode))
|
||||
print("套件:{}".format(", ".join(picked)))
|
||||
print("构建:{}".format(BUILD_BAT))
|
||||
print("构建:{}".format(KEIL_BUILD))
|
||||
if not args.check_build:
|
||||
print("烧录:{}".format(DOWNLOAD_BAT))
|
||||
print("判读:{}".format(RUN_BOOT))
|
||||
@@ -180,8 +180,10 @@ def main(argv=None):
|
||||
print("################ {} ################".format(suite))
|
||||
_rewrite_config(macro)
|
||||
|
||||
# 1) 构建
|
||||
rc, out = _run([str(BUILD_BAT)], timeout=args.build_timeout)
|
||||
# 1) 构建(@build = keil-build skill;脚本内超时先于 _run 超时触发,
|
||||
# 超时会返回 rc=1 + BUILD_FAIL 文案,而不是被 _run 杀掉)
|
||||
rc, out = _run([py, str(KEIL_BUILD), "--timeout", str(args.build_timeout)],
|
||||
timeout=args.build_timeout + 60)
|
||||
tail = "\n".join(out.strip().splitlines()[-6:])
|
||||
print("[BUILD] rc={}".format(rc))
|
||||
if tail:
|
||||
@@ -246,7 +248,8 @@ def main(argv=None):
|
||||
if restored and not args.keep_config:
|
||||
print("")
|
||||
print("[..] 复位构建产物为产品态(重建一次产品固件,避免 .map 停留在测试套件态)...")
|
||||
rc, out = _run([str(BUILD_BAT)], timeout=args.build_timeout)
|
||||
rc, out = _run([py, str(KEIL_BUILD), "--timeout", str(args.build_timeout)],
|
||||
timeout=args.build_timeout + 60)
|
||||
tail = "\n".join(out.strip().splitlines()[-4:])
|
||||
if rc == 0:
|
||||
print("[OK] 产品固件已重建(.map/.axf 复位)")
|
||||
|
||||
Reference in New Issue
Block a user