Skip to content

Commit

Permalink
i_972 Update sandbox scripts for correct run-by-hand message
Browse files Browse the repository at this point in the history
The message telling the judge how to run a judgment by hand specified the absolute path of the autojudge, not the current user.  This has been fixed.
  • Loading branch information
johnbrvc committed Aug 25, 2024
1 parent b248f59 commit 0d210b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
3 changes: 2 additions & 1 deletion scripts/pc2sandbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ DEBUG echo Command line: $0 $*
shift 6

DEBUG echo -e "\nYou can run this by hand in the sandbox by using the following command:"
RUN_LOCAL_CMD="$0 ${MEMLIMIT} ${TIMELIMIT} xxx xxx $TESTCASE ${COMMAND} $* < ${JUDGEIN} > $TESTCASE.ans"
scriptname=`basename $0`
RUN_LOCAL_CMD="./${scriptname} ${MEMLIMIT} ${TIMELIMIT} xxx xxx $TESTCASE ${COMMAND} $* < ${JUDGEIN} > $TESTCASE.ans"
DIFF_OUTPUT_CMD="diff -w ${JUDGEANS} $TESTCASE.ans | more"
DEBUG echo -e "\n${RUN_LOCAL_CMD}"
DEBUG echo -e "\nor, without the sandbox by using the following command:"
Expand Down
19 changes: 3 additions & 16 deletions scripts/pc2sandbox_interactive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -395,28 +395,15 @@ COMMAND="$7"
DEBUG echo "+---------------- Test Case ${TESTCASE} ----------------+"
DEBUG echo Command line: $0 $*
shift 7
# the rest of the commmand line arguments are the command args for the submission

DEBUG echo -e "\nYou can run this by hand in the sandbox by using the following command:"
RUN_LOCAL_CMD="$0 ${MEMLIMIT} ${TIMELIMIT} ${VALIDATOR} ${JUDGEIN} ${JUDGEANS} ${TESTCASE} ${COMMAND} $*"
tcfile=`printf "$REPORTDIR/testcase_%03d.log" $TESTCASE`
REPORT_OUTPUT_CMD="more ${tcfile}"
DEBUG echo -e "\n${RUN_LOCAL_CMD}"
#DEBUG echo -e "\nor, without the sandbox by using the following command:"
#DEBUG echo -e "\n${COMMAND} $* < ${JUDGEIN} > $TESTCASE.ans"
DEBUG echo -e "\nAnd see the run report using the following command:"
DEBUG echo -e "\n${REPORT_OUTPUT_CMD}\n"

# Skip used arguments
shift 7

# the rest of the commmand line arguments are the command args for the submission
DEBUG echo -e "\nYou can run this by hand in the sandbox by using the following command:"
RUN_LOCAL_CMD="$0 ${MEMLIMIT} ${TIMELIMIT} ${VALIDATOR} ${JUDGEIN} ${JUDGEANS} ${TESTCASE} ${COMMAND} $*"
scriptname=`basename $0`
RUN_LOCAL_CMD="./${scriptname} ${MEMLIMIT} ${TIMELIMIT} ${VALIDATOR} ${JUDGEIN} ${JUDGEANS} ${TESTCASE} ${COMMAND} $*"
tcfile=`printf "$REPORTDIR/testcase_%03d.log" $TESTCASE`
REPORT_OUTPUT_CMD="more ${tcfile}"
DEBUG echo -e "\n${RUN_LOCAL_CMD}"
#DEBUG echo -e "\nor, without the sandbox by using the following command:"
#DEBUG echo -e "\n${COMMAND} $* < ${JUDGEIN} > $TESTCASE.ans"
DEBUG echo -e "\nAnd see the run report using the following command:"
DEBUG echo -e "\n${REPORT_OUTPUT_CMD}\n"

Expand Down

0 comments on commit 0d210b5

Please sign in to comment.