First Phase: Compilation
-
Create a temporary directory for autograding this student’s submission.
-
Create a temporary subdirectory for compilation.
-
Copy the student’s submitted source code (for compiled languages) to this temporary directory. Note: The copied files can be controlled with the
submission_to_compilation
variable inconfig.json
. -
Copy the files from the
provided_code
directory into the temporary compilation subdirectory. -
Scan through the testcases in the
config.json
for all testcases with type = “compilation”. -
Execute the “command”(s) for the compilation testcases.
-
Rename the
STDOUT.txt
,STDERR.txt
, execution logfiles, and specified output files that are to have been created by the program execution (prefix with test case number).
Second Phase: Execution
-
Create a temporary subdirectory for runner and validation work.
-
Copy the student’s submitted source code (for interpreted languages) to the
tmp_work
subdirectory. Note: The copied files can be controlled with thesubmission_to_runner
variable inconfig.json
. -
Copy the test input files to the
tmp_work
subdirectory. -
Copy the compiled executables from the
tmp_compilation
subdirectory to thetmp_work
subdirectory. Note: The copied files can be controlled with thecompilation_to_runner
variable inconfig.json
. -
Scan through the testcases in the
config.json
for all testcases with type = “execution”. -
Execute the “command”(s) for the execution testcases.
-
Rename the
STDOUT.txt
,STDERR.txt
, execution logfiles, and specified output files that are to have been created by the program execution (prefix with test case number).
Third Phase: Validation
-
Copy specific files as needed from the student’s submission languages to the
tmp_work
subdirectory. Note: These files are specified with thesubmission_to_validation
variable inconfig.json
. -
Copy the custom validation code into the
tmp_work
subdirectory. -
Copy the expected test output into the
tmp_work
subdirectory. -
Copy output files from compilation from the
tmp_compilation
subdirectory to thetmp_work
subdirectory. Note: The copied files can be controlled with thecompilation_to_validation
variable inconfig.json
. -
Scan through the test cases in the
config.json
and perform the validation checks indicated within each check. -
Calculate the score for each test case, and determine what messages and files should be displayed for each test case.
-
Write the
results.json
andgrade.txt
files. -
Copy files as needed from the
tmp_work
directory for archive to the details subfolder of the student’s results directory for this assignment and submission version. Note: The copied files can be controlled with thework_to_details
variable inconfig.json
.
Variables to move files
As outlined in the above sections & diagrams, there are 6 different
configuration settings in the config.json
to control the movement of
files. Some of them have reasonable defaults for assignments that are
compiling and running Python, C++, and Java programs (we may update
these defaults in future revisions to Submitty). Each setting should
be a list of one or more strings to match against files. You may use
wildcards. Example of syntax:
"autograding" : {
"submission_to_compilation" : [ "part1/*.pdf" ],
"submission_to_runner" : [ "part2/*.pdf", "special.xlsx" ],
"compilation_to_runner" : [ "**/*.pdf" ],
"submission_to_validation" : [ "part3/*.png" ],
"compilation_to_validation" : [ "*/*.pdf" ],
"work_to_details" : [ "*.pdf" ]
},
These file match patterns will be appended to the Submitty defaults, defined here: grading/load_config_json.cpp