@@ -270,7 +270,10 @@ public function exportAction(int $problemId): StreamedResponse
270
270
$ yaml = ['name ' => $ problem ->getName ()];
271
271
if (!empty ($ problem ->getCompareExecutable ())) {
272
272
$ yaml ['validation ' ] = 'custom ' ;
273
+ } elseif ($ problem ->getCombinedRunCompare () && !empty ($ problem ->getRunExecutable ())) {
274
+ $ yaml ['validation ' ] = 'custom interactive ' ;
273
275
}
276
+
274
277
if (!empty ($ problem ->getSpecialCompareArgs ())) {
275
278
$ yaml ['validator_flags ' ] = $ problem ->getSpecialCompareArgs ();
276
279
}
@@ -300,6 +303,27 @@ public function exportAction(int $problemId): StreamedResponse
300
303
$ problem ->getProblemtext ());
301
304
}
302
305
306
+ $ compareExecutable = null ;
307
+ if ($ problem ->getCompareExecutable ()) {
308
+ $ compareExecutable = $ problem ->getCompareExecutable ();
309
+ } elseif ($ problem ->getCombinedRunCompare ()) {
310
+ $ compareExecutable = $ problem ->getRunExecutable ();
311
+ }
312
+ if ($ compareExecutable ) {
313
+ foreach ($ compareExecutable ->getImmutableExecutable ()->getFiles () as $ file ) {
314
+ $ filename = sprintf ('output_validators/%s/%s ' , $ compareExecutable ->getExecid (), $ file ->getFilename ());
315
+ $ zip ->addFromString ($ filename , $ file ->getFileContent ());
316
+ if ($ file ->isExecutable ()) {
317
+ // 100755 = regular file, executable
318
+ $ zip ->setExternalAttributesName (
319
+ $ filename ,
320
+ ZipArchive::OPSYS_UNIX ,
321
+ octdec ('100755 ' ) << 16
322
+ );
323
+ }
324
+ }
325
+ }
326
+
303
327
foreach ([true , false ] as $ isSample ) {
304
328
/** @var Testcase[] $testcases */
305
329
$ testcases = $ this ->em ->createQueryBuilder ()
0 commit comments