chore(test): 回归脚本去除 *_mlir 目录候选

构建产物目录不再带 _mlir 后缀,两个回归脚本的目录探测候选同步收敛为 temp/output。
This commit is contained in:
TermiNexus committed 2026-10-07 19:02:52 +08:00
1 parent ee6461be46
commit 30b14bc477
2 files changed
+6 -16

No files matched your search

+4 -11
View File
@@ -105,31 +105,24 @@ def find_executables(output_dir):
def find_output_dirs(proj_dir, proj_config):
"""收集候选输出目录(兼容 TPC 与 TPV 布局)
"""收集候选输出目录(TPC 与 TPV 布局一致:{build_dir}/output)
- {output_dir}(默认 output,TPC/旧布局)
- {output_dir}(默认 output)
- {build_dir}/{output_dir}(build_dir 默认 .tpv_build)
- {build_dir}/output(TPV 布局:.tpv_build/output)
- 以上各项的 *_mlir 变体(单端 MLIR 布局:OutputDir = {BuildDir}/output_mlir,
见 TransPyV/App/lib/Projectrans/Config.vp 的 mlir_dir_suffix())
- {build_dir}/output
保序去重返回。
注意:ZlibDbg 等项目的 project.json 既无 output_dir 也无 build_dir,
此时必须仍把 .tpv_build/output 纳入候选,否则 TPV 编译成功的 exe
定位不到(报"无可执行二进制文件")。
单端 MLIR 后 exe 落在 {BuildDir}/output_mlir(非 output),且旧 LLVM 布局
的 output/ 可能残留同名旧 exe,故 *_mlir 变体**优先**探测。
"""
od = proj_config.get('output_dir') or 'output'
bd = proj_config.get('build_dir') or '.tpv_build'
# 单端 MLIR 目录后缀(与 Config.mlir_dir_suffix() 同口径,当前恒为 "_mlir")
mlir_suf = '_mlir'
base = [
dirs = [
os.path.abspath(os.path.join(proj_dir, od)),
os.path.abspath(os.path.join(proj_dir, bd, od)),
os.path.abspath(os.path.join(proj_dir, bd, 'output')),
]
dirs = [d + mlir_suf for d in base] + base
seen = set()
uniq = []
for d in dirs: