From 3f10304d05f7c7135addec40fd7554e05981182b Mon Sep 17 00:00:00 2001 From: Jaap Eldering Date: Mon, 14 Oct 2024 00:35:40 +0200 Subject: [PATCH] Fixes to unbreak migrating to multipass support --- judge/judgedaemon.main.php | 5 +++-- judge/run-interactive.sh | 0 2 files changed, 3 insertions(+), 2 deletions(-) mode change 100644 => 100755 judge/run-interactive.sh diff --git a/judge/judgedaemon.main.php b/judge/judgedaemon.main.php index 8f4a44c068..262d3a1004 100644 --- a/judge/judgedaemon.main.php +++ b/judge/judgedaemon.main.php @@ -333,7 +333,8 @@ function fetch_executable_internal( $execbuildpath = $execbuilddir . '/build'; $execrunpath = $execbuilddir . '/run'; $execrunjurypath = $execbuilddir . '/runjury'; - if (!is_dir($execdir) || !file_exists($execdeploypath)) { + if (!is_dir($execdir) || !file_exists($execdeploypath) || + ($combined_run_compare && file_get_contents(LIBJUDGEDIR . '/run-interactive.sh')!==file_get_contents($execrunpath))) { system('rm -rf ' . dj_escapeshellarg($execdir) . ' ' . dj_escapeshellarg($execbuilddir)); system('mkdir -p ' . dj_escapeshellarg($execbuilddir), $retval); if ($retval !== 0) { @@ -1399,7 +1400,7 @@ function judge(array $judgeTask): bool $input = $tcfile['input']; $output = $tcfile['output']; - $passLimit = $run_config['pass_limit']; + $passLimit = $run_config['pass_limit'] ?? 1; for ($passCnt = 1; $passCnt <= $passLimit; $passCnt++) { $nextPass = false; if ($passLimit > 1) { diff --git a/judge/run-interactive.sh b/judge/run-interactive.sh old mode 100644 new mode 100755