@@ -261,7 +261,10 @@ public function exportAction(int $problemId): StreamedResponse
261
261
$ yaml = ['name ' => $ problem ->getName ()];
262
262
if (!empty ($ problem ->getCompareExecutable ())) {
263
263
$ yaml ['validation ' ] = 'custom ' ;
264
+ } elseif ($ problem ->getCombinedRunCompare () && !empty ($ problem ->getRunExecutable ())) {
265
+ $ yaml ['validation ' ] = 'custom interactive ' ;
264
266
}
267
+
265
268
if (!empty ($ problem ->getSpecialCompareArgs ())) {
266
269
$ yaml ['validator_flags ' ] = $ problem ->getSpecialCompareArgs ();
267
270
}
@@ -291,6 +294,27 @@ public function exportAction(int $problemId): StreamedResponse
291
294
stream_get_contents ($ problem ->getProblemtext ()));
292
295
}
293
296
297
+ $ compareExecutable = null ;
298
+ if ($ problem ->getCompareExecutable ()) {
299
+ $ compareExecutable = $ problem ->getCompareExecutable ();
300
+ } elseif ($ problem ->getCombinedRunCompare ()) {
301
+ $ compareExecutable = $ problem ->getRunExecutable ();
302
+ }
303
+ if ($ compareExecutable ) {
304
+ foreach ($ compareExecutable ->getImmutableExecutable ()->getFiles () as $ file ) {
305
+ $ filename = sprintf ('output_validators/%s/%s ' , $ compareExecutable ->getExecid (), $ file ->getFilename ());
306
+ $ zip ->addFromString ($ filename , $ file ->getFileContent ());
307
+ if ($ file ->isExecutable ()) {
308
+ // 100755 = regular file, executable
309
+ $ zip ->setExternalAttributesName (
310
+ $ filename ,
311
+ ZipArchive::OPSYS_UNIX ,
312
+ octdec ('100755 ' ) << 16
313
+ );
314
+ }
315
+ }
316
+ }
317
+
294
318
foreach ([true , false ] as $ isSample ) {
295
319
/** @var Testcase[] $testcases */
296
320
$ testcases = $ this ->em ->createQueryBuilder ()
0 commit comments