File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -1410,6 +1410,15 @@ function judge(array $judgeTask): bool
14101410 $ passdir = $ testcasedir . '/ ' . $ passCnt ;
14111411 mkdir ($ passdir , 0755 , true );
14121412
1413+ if ($ passCnt > 1 ) {
1414+ $ cpcmd = 'cp -R ' . $ passdir . '/../ ' . ($ passCnt - 1 ) . '/feedback ' . $ passdir . '/ ' ;
1415+ system ($ cpcmd );
1416+ logmsg (LOG_INFO , " Copying feedback dir from pass " . ($ passCnt - 1 ) . ': ' . $ cpcmd );
1417+ $ rmcmd = 'rm ' . $ passdir . '/feedback/nextpass.in ' ;
1418+ system ($ rmcmd );
1419+ logmsg (LOG_INFO , " Executing " . $ rmcmd );
1420+ }
1421+
14131422 // Copy program with all possible additional files to testcase
14141423 // dir. Use hardlinks to preserve space with big executables.
14151424 $ programdir = $ passdir . '/execdir ' ;
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ if [ $COMBINED_RUN_COMPARE -eq 1 ]; then
195195 # A combined run and compare script may now already need the
196196 # feedback directory, and perhaps access to the test answers (but
197197 # only the original that lives outside the chroot).
198- mkdir feedback
198+ mkdir -p feedback
199199 RUNARGS=" $RUNARGS $TESTOUT compare.meta feedback"
200200fi
201201
@@ -232,8 +232,8 @@ if [ $COMBINED_RUN_COMPARE -eq 0 ]; then
232232
233233 exitcode=0
234234 # Create dir for feedback files and make it writable for $RUNUSER
235- mkdir feedback
236- chmod a+w feedback
235+ mkdir -p feedback
236+ chmod -R a+w feedback
237237
238238 runcheck $GAINROOT " $RUNGUARD " ${DEBUG: +-v} $CPUSET_OPT -u " $RUNUSER " -g " $RUNGROUP " \
239239 -m $SCRIPTMEMLIMIT -t $SCRIPTTIMELIMIT --no-core \
You can’t perform that action at this time.
0 commit comments