Skip to content

Add a new batch-and-output task type. #1330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions cms/grading/steps/trusted.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def trusted_step(sandbox, commands):


def checker_step(sandbox, checker_digest, input_digest, correct_output_digest,
output_filename):
output_filename, extra_args=None):
"""Run the explicit checker given by the admins

sandbox (Sandbox): the sandbox to run the checker in; should already
Expand All @@ -196,6 +196,7 @@ def checker_step(sandbox, checker_digest, input_digest, correct_output_digest,
as "correct_output.txt".
output_filename (str): inner filename of the user output (already in the
sandbox).
extra_args ([str]|None): extra arguments to pass to the checker.

return (bool, float|None, [str]|None): success (true if the checker was
able to check the solution successfully), outcome and text (both None
Expand Down Expand Up @@ -228,7 +229,7 @@ def checker_step(sandbox, checker_digest, input_digest, correct_output_digest,
command = ["./%s" % CHECKER_FILENAME,
CHECKER_INPUT_FILENAME,
CHECKER_CORRECT_OUTPUT_FILENAME,
output_filename]
output_filename] + (extra_args if extra_args is not None else [])
box_success, success, unused_stats = trusted_step(sandbox, [command])
if not box_success or not success:
logger.error("Sandbox failed during checker step. "
Expand Down
Loading