diff --git a/gitlab/integration.sh b/gitlab/integration.sh index 946123bd58..979cc6e1cf 100755 --- a/gitlab/integration.sh +++ b/gitlab/integration.sh @@ -204,15 +204,15 @@ section_end judging # We expect # - two submissions with ambiguous outcome, -# - no submissions without magic string, +# - one submissions submitted through the submit client, and thus the magic string ignored, # - and all submissions to be judged. -if [ $NUMNOTVERIFIED -ne 2 ] || [ $NUMNOMAGIC -ne 0 ] || [ $NUMSUBS -gt $((NUMVERIFIED+NUMNOTVERIFIED)) ]; then +if [ $NUMNOTVERIFIED -ne 2 ] || [ $NUMNOMAGIC -ne 1 ] || [ $NUMSUBS -gt $((NUMVERIFIED+NUMNOTVERIFIED)) ]; then section_start error "Short error description" # We error out below anyway, so no need to fail earlier than that. set +e echo "verified subs: $NUMVERIFIED, unverified subs: $NUMNOTVERIFIED, total subs: $NUMSUBS" echo "(expected 2 submissions to be unverified, but all to be processed)" - echo "Of these $NUMNOMAGIC do not have the EXPECTED_RESULTS string (should be 0)." + echo "Of these $NUMNOMAGIC do not have the EXPECTED_RESULTS string (should be 1)." curl $CURLOPTS "http://localhost/domjudge/jury/judging-verifier?verify_multiple=1" | w3m -dump -T text/html section_end error diff --git a/webapp/src/Service/SubmissionService.php b/webapp/src/Service/SubmissionService.php index 43453b3e1a..1d01c96096 100644 --- a/webapp/src/Service/SubmissionService.php +++ b/webapp/src/Service/SubmissionService.php @@ -556,7 +556,9 @@ public function submitSolution( // First look up any expected results in all submission files to minimize the // SQL transaction time below. - if ($this->dj->checkrole('jury')) { + // Only do this for problem import submissions, as we do not want this for re-submitted submissions nor + // submissions that come through the API, e.g. when doing a replay of an old contest. + if ($this->dj->checkrole('jury') && $source == 'problem import') { $results = null; foreach ($files as $file) { $fileResult = self::getExpectedResults(file_get_contents($file->getRealPath()),