@@ -608,7 +608,12 @@ public function addDebugInfo(
608
608
),
609
609
new OA \Property (
610
610
property: 'metadata ' ,
611
- description: 'The (base64-encoded) metadata ' ,
611
+ description: 'The (base64-encoded) metadata of the run ' ,
612
+ type: 'string '
613
+ ),
614
+ new OA \Property (
615
+ property: 'compare_metadata ' ,
616
+ description: 'The (base64-encoded) metadata of the validator ' ,
612
617
type: 'string '
613
618
),
614
619
]
@@ -647,14 +652,15 @@ public function addJudgingRunAction(
647
652
$ teamMessage = $ request ->request ->get ('team_message ' );
648
653
$ metadata = $ request ->request ->get ('metadata ' );
649
654
$ testcasedir = $ request ->request ->get ('testcasedir ' );
655
+ $ compareMeta = $ request ->request ->get ('compare_metadata ' );
650
656
651
657
$ judgehost = $ this ->em ->getRepository (Judgehost::class)->findOneBy (['hostname ' => $ hostname ]);
652
658
if (!$ judgehost ) {
653
659
throw new BadRequestHttpException ("Who are you and why are you sending us any data? " );
654
660
}
655
661
656
662
$ hasFinalResult = $ this ->addSingleJudgingRun ($ judgeTaskId , $ hostname , $ runResult , $ runTime ,
657
- $ outputSystem , $ outputError , $ outputDiff , $ outputRun , $ teamMessage , $ metadata , $ testcasedir );
663
+ $ outputSystem , $ outputError , $ outputDiff , $ outputRun , $ teamMessage , $ metadata , $ testcasedir, $ compareMeta );
658
664
$ judgehost = $ this ->em ->getRepository (Judgehost::class)->findOneBy (['hostname ' => $ hostname ]);
659
665
$ judgehost ->setPolltime (Utils::now ());
660
666
$ this ->em ->flush ();
@@ -910,16 +916,17 @@ protected function giveBackJudging(int $judgingId, ?Judgehost $judgehost): void
910
916
*/
911
917
private function addSingleJudgingRun (
912
918
int $ judgeTaskId ,
913
- string $ hostname ,
914
- string $ runResult ,
915
- string $ runTime ,
916
- string $ outputSystem ,
917
- string $ outputError ,
918
- string $ outputDiff ,
919
- string $ outputRun ,
919
+ string $ hostname ,
920
+ string $ runResult ,
921
+ string $ runTime ,
922
+ string $ outputSystem ,
923
+ string $ outputError ,
924
+ string $ outputDiff ,
925
+ string $ outputRun ,
920
926
?string $ teamMessage ,
921
- string $ metadata ,
922
- ?string $ testcasedir
927
+ string $ metadata ,
928
+ ?string $ testcasedir ,
929
+ ?string $ compareMeta ,
923
930
): bool {
924
931
$ resultsRemap = $ this ->config ->get ('results_remap ' );
925
932
$ resultsPrio = $ this ->config ->get ('results_prio ' );
@@ -940,7 +947,8 @@ private function addSingleJudgingRun(
940
947
$ outputRun ,
941
948
$ teamMessage ,
942
949
$ metadata ,
943
- $ testcasedir
950
+ $ testcasedir ,
951
+ $ compareMeta
944
952
) {
945
953
$ judgingRun = $ this ->em ->getRepository (JudgingRun::class)->findOneBy (
946
954
['judgetaskid ' => $ judgeTaskId ]);
@@ -962,6 +970,10 @@ private function addSingleJudgingRun(
962
970
->setOutputSystem (base64_decode ($ outputSystem ))
963
971
->setMetadata (base64_decode ($ metadata ));
964
972
973
+ if ($ compareMeta ) {
974
+ $ judgingRunOutput ->setValidatorMetadata (base64_decode ($ compareMeta ));
975
+ }
976
+
965
977
if ($ teamMessage ) {
966
978
$ judgingRunOutput ->setTeamMessage (base64_decode ($ teamMessage ));
967
979
}
0 commit comments