KIT: 검사 임시 폴더를 실행마다 따로 — 동시 검사 충돌 방지

코치가 저장소 밖 사본 두 개에서 check.sh 를 동시에 돌려 둘 다 FAIL 0·임시 폴더 남지 않음을 확인.

결과: PASS 153 / FAIL 0 / SKIP 3 (검사 범위 F01~F47)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
오문성andClaude Haiku 5.5 committed 2026-10-30 16:15:41 +09:00
1 parent 4d21c3bb08
commit 367356187b
1 file changed
+2 -1
+2 -1
View File
@@ -372,7 +372,7 @@ bad_imp = [m for m in re.findall(r"^\s*(?:import|from)\s+([A-Za-z_][\w.]*)", too
("sys", "re", "math", "json", "os", "argparse", "collections", "itertools", "functools", "pathlib")]
report("F33", bool(tool) and not bad_nums and not bad_imp, "tools/extract_from_dxf.py 있음, 도면 좌표·정답 숫자·외부 라이브러리 없음"
+ (f" — 숫자: {bad_nums}" if bad_nums else "") + (f" — import: {bad_imp}" if bad_imp else ""))
TMP = tempfile.gettempdir()
TMP = tempfile.mkdtemp(prefix="d3w_") # 실행마다 따로 — 여러 폴더에서 동시에 검사해도 임시 파일이 섞이지 않게
EX, err = (run_extract(DXF, os.path.join(TMP, "d3w_ex.js")) if have_dxf else (None, "private/drawing.dxf 없음"))
ex_parts = EX.get("parts", []) if isinstance(EX, dict) else []
ek = lambda k_: [p for p in ex_parts if isinstance(p, dict) and p.get("kind") == k_]
@@ -1114,6 +1114,7 @@ for cp in ichecks:
check(False, f"{cp} 실행 오류: {type(e).__name__}: {e}")
print(f"이슈 검사 파일 {len(ichecks)}개" + (f": {', '.join(os.path.basename(p) for p in ichecks)}" if ichecks else ""))
shutil.rmtree(TMP, ignore_errors=True)
print(f"결과: PASS {count['PASS']} / FAIL {count['FAIL']} / SKIP {count['SKIP']} (검사 범위 F01~{upto})")
sys.exit(0 if count["FAIL"] == 0 else 1)
PY