Skip to content

Commit

Permalink
fix(judge): 自动清理评测过程中产生的编译结果
Browse files Browse the repository at this point in the history
  • Loading branch information
XYCode-Kerman committed Apr 11, 2024
1 parent c3ee930 commit 9a7ed6c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions judge/player.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import shutil
from pathlib import Path
from typing import Dict, List, Union

Expand Down Expand Up @@ -91,6 +92,9 @@ def judging(self, ccf: CCF) -> JudgingResult:
status=running_result
)
)

# 清理编译结果
shutil.rmtree(compiled.parent, ignore_errors=True)
else:
judge_logger.warning(
f'{problem_dir.joinpath(f"{problem.judge_config.source_file_name}.cpp").absolute()} 不存在或是不符合题目配置的编程语言。')
Expand Down

0 comments on commit 9a7ed6c

Please sign in to comment.