2 TDIR = "{HOME}/testing"
3 PDIR = "{HOME}/tasks/{TASK}"
6 USER_LOG = "{TDIR}/log"
7 TEST_LOG = "{TDIR}/{TEST}.log"
8 TASK_CONFIG = "{PDIR}/config"
9 STATUS_FILE = "{TDIR}/status"
11 # Default debug level - INFO
18 EXTENSIONS += " dummy "
20 # input extension to language
23 if (EXT == "pas") {LANG = "fpc"}
24 if (EXT == "fp") {LANG = "fpc"}
25 if (EXT == "gp") {LANG = "gpc"}
26 if (EXT == "c") {LANG = "gcc"}
27 if (EXT == "cc") {LANG = "c++"}
28 if (EXT == "cpp") {LANG = "c++"}
30 #### Old config format (inspiration?)
32 # # HOME set automatically
33 # # CONTESTANT set automatically
34 # # TASK set automatically
36 # PDIR="${HOME}/problems/${TASK}"
37 # SDIR="${HOME}/solutions/${CONTESTANT}/${TASK}"
38 # TDIR="${HOME}/testing/${CONTESTANT}/${TASK}"
40 # TESTCASE_IN=${TEST}.in
41 # TESTCASE_OUT=${TEST}.out
42 # TESTCASE_OK=${TEST}.ok
43 # TESTCASE_STATUS=${TEST}.stat
44 # TESTCASE_RAW=${TEST}.raw
45 # # backward compatibility
46 # TESTCASE_PTS=${TEST}.pts
53 # ### Programming language settings
55 # # Known source file extensions
56 # EXTENSIONS="c cc C cpp p pas"
58 # # Some of the extensions can be aliases for other extensions
65 # ## Variables which control compilation and execution
66 # ## (see below for values for individual languages)
68 # # Command used to run the compiler
71 # # Sandbox options used when compiling
72 # COMP_SANDBOX_OPTS="-m262144 -w60 -e -i/dev/null"
76 # # Command used to execute the compiled program, may be ./$PROGRAM (default) or an
77 # # interpreter with $PROGRAM as a parameter.
78 # TEST_EXEC_CMD=./$EXE
80 # ## Settings for individual languages
83 # EXT_c_COMP="/usr/bin/gcc -std=gnu99 -O2 -g -o $EXE $EXTRA_CFLAGS $SRC -lm"
87 # EXT_cpp_COMP="/usr/bin/g++ -O2 -g -o $EXE $EXTRA_CXXFLAGS $SRC -lm"
91 # EXT_pas_COMP="/usr/bin/fpc -Ci -g -O2 -Sg -o$EXE $EXTRA_PFLAGS $SRC"
94 # ### Per-task configuration variables (default values, override in per-task config)
96 # # List of extra files needed for compilation. They are copied to the compiler
97 # # sandbox from the problem's directory. XXX: or tdir
98 # #COMP_EXTRAS="extras.h"
101 # # batch off-line task
102 # # interactive interactive task communicating via stdio with a testing program
103 # # open-data open-data task (i.e., we don't submit program, but output files)
106 # # I/O type (IO_TYPE sets defaults for IN_TYPE and OUT_TYPE)
107 # # file input from $PROBLEM.in, output to $PROBLEM.out (possible even for interactive tasks)
108 # # stdio input from stdin, output to stdout
109 # # dir input from all files in the directory $TEST.in; these are copied to $BOXDIR
110 # # and if they include .stdin, it will be available as program's std. input.
111 # # none no input/output
119 # # A list of all tests
120 # TESTS="1 2 3 4 5 6 7 8 9 10"
122 # # A list of public tests (executed by submit and check scripts)
125 # # Number of points per test
128 # # Time limit in seconds (can be fractional, but beware of noise)
131 # # Memory limit in kilobytes
134 # # Stack size limit in kilobytes (0=limited only by MEM_LIMIT)
137 # # Command used for filtering of program output (optional)
138 # # If turned on, program output (*.raw) is ran through this filter and the
139 # # checkers are applied to the output of the filter (*.out).
140 # # Can exit with code 1 if there is a syntax error in the output.
141 # #OUTPUT_FILTER=tr -d '\r' <$TDIR/$TEST.raw >$TDIR/$TEST.out
143 # # Command used to check output syntax (optional)
144 # # Returns exit code 1 if syntax is wrong, 0 if correct
145 # # fd1 is connect to evaluator log, feel free to log anything
146 # # fd2 is an optional one-line verdict
147 # #SYNTAX_CHECK=grep -v -- - $TDIR/$TEST.out
149 # # Command used to check output correctness
150 # # Returns exit code 1 if output is incorrect, 0 if correct
151 # # fd1 is connect to evaluator log, feel free to log anything
152 # # fd2 is an optional one-line verdict
153 # # The checker can generate $TDIR/$TEST.pts to assign points irregularly
154 # OUTPUT_CHECK=diff -bBu $TDIR/$TEST.ok $TDIR/$TEST.out
156 # # Checker for interactive tasks
157 # # Returns exit code 1 if test failed, 0 if passed
158 # # fd0 and fd1 are connected to fd1 and fd0 of the program tested
159 # # fd2 is an optional one-line verdict
160 # # The checker can generate $TDIR/$TEST.pts to assign points irregularly
161 # #IC_CHECK=$PDIR/checker $PDIR/$TEST.in $PDIR/$TEST.chk
163 # # Sandbox options used when testing
164 # TEST_SANDBOX_OPTS=-a2 -f -m$MEM_LIMIT -k$STACK_LIMIT -t$TIME_LIMIT $BOX_EXTRAS $BOX_IO_OPTS
166 # # Extra options to be overridden in task configuration
169 # ### Hook priorities:
171 # # Task pipeline for batch and interactive tasks:
178 # # 000 setup copy input and correct output to $TDIR
179 # # 100 prepare copy input and executables to the sandbox
180 # # 200 run run inside the sandbox
181 # # 300 collect copy output out of the sandbox
182 # # 400 filter filter the output ($OUTPUT_FILTER)
183 # # 500 syntax check syntax of the output ($SYNTAX_CHECK)
184 # # 600 judge check correctness of the output ($OUTPUT_CHECK)
185 # # 700 points award $POINTS_PER_TEST points unless already done