]> mj.ucw.cz Git - moe.git/blob - eval/eval.cf
mo-backup: Do not forget to back up submit server
[moe.git] / eval / eval.cf
1 # Configuration file for the MO Evaluator
2 # (c) 2001--2008 Martin Mares <mj@ucw.cz>
3
4 # User and group used by the evaluator itself
5 EVAL_USER=mo-eval
6 EVAL_GROUP=mo-eval
7
8 # Test user for the sandbox. You can let mo-setup create more test users
9 # and then run several evaluators in parallel, each in its own sandbox.
10 # For testing, you can also leave TEST_USER undefined and run the sandbox
11 # with EVAL_USER privileges, but beware, this is INSECURE.
12 #TEST_USER=${TEST_USER:-mo-test1}
13 TEST_USERS="mo-test1 mo-test2"
14 TEST_GROUP=mo-test
15
16 ### Programming language settings
17
18 # Known source file extensions
19 EXTENSIONS="c cc C cpp p pas"
20
21 # Some of the extensions can be aliases for other extensions
22 ALIAS_EXT_cc=cpp
23 ALIAS_EXT_C=cpp
24 ALIAS_EXT_p=pas
25
26 ## Variables which control compilation and execution
27 ## (see below for values for individual languages)
28
29 # Command used to run the compiler
30 COMP=false
31
32 # Sandbox options used when compiling
33 COMP_SANDBOX_OPTS='-m262144 -w60 -e -i/dev/null'
34
35 # Extra per-language sandbox options used when testing
36 LANG_SANDBOX_OPTS=
37
38 # Translation of runtime errors: a function, which receives the exit code as an argument and
39 # if it is recognized as a runtime error code, it prints its name to the standard output.
40 EXIT_CODE_HOOK=
41
42 # Hooks which can alter the contents of the sandbox in $BOXDIR before/after compilation/running
43 PRE_COMPILE_HOOK=
44 POST_COMPILE_HOOK=
45 PRE_RUN_HOOK=
46 POST_RUN_HOOK=
47
48 # Command used to execute the compiled program, may be ./$PROGRAM (default) or an
49 # interpreter with $PROGRAM as a parameter.
50 TEST_EXEC_CMD=
51
52 ## Settings for individual languages
53
54 # C
55 EXT_c_COMP='/usr/bin/gcc -std=gnu99 -O2 -g -o $EXE $EXTRA_CFLAGS $SRC -lm'
56 EXTRA_CFLAGS=
57
58 # C++
59 EXT_cpp_COMP='/usr/bin/g++ -O2 -g -o $EXE $EXTRA_CXXFLAGS $SRC -lm'
60 EXTRA_CXXFLAGS=
61
62 # Pascal
63 EXT_pas_COMP='/usr/bin/fpc -Ci -g -O2 -Sg -o$EXE $EXTRA_PFLAGS $SRC'
64 EXTRA_PFLAGS=
65 EXT_pas_EXIT_CODE_HOOK=fpc-exit-code
66
67 ### Per-task configuration variables (default values, override in per-task config)
68
69 # List of extra files needed for compilation. They are copied to the compiler
70 # sandbox from the problem's directory.
71 #COMP_EXTRAS="extras.h"
72
73 ## Tester settings (most can be overriden in per-test config):
74
75 # The following variables are automatically set by the evaluator:
76 # PROBLEM       name of the problem
77 # HDIR          home directory of the evaluator (i.e., this file is $HDIR/cf/eval)
78 # PDIR          directory containing problem data
79 # SDIR          directory containing contestant's solution
80 # TDIR          directory containing testing results
81 # TMPDIR        directory containing temporary files
82 # TEST          name of the current test
83
84 # Task type:
85 # offline       off-line task
86 # interactive   interactive task communicating via stdio with a testing program
87 # open-data     open-data task (i.e., we don't submit program, but output files)
88 TASK_TYPE=file
89
90 # I/O type (IO_TYPE sets defaults for IN_TYPE and OUT_TYPE)
91 # file          input from $PROBLEM.in, output to $PROBLEM.out (possible even for interactive tasks)
92 # stdio         input from stdin, output to stdout
93 # dir           input from all files in the directory $TEST.in; these are copied to $BOXDIR
94 #               and if they include .stdin, it will be available as program's std. input.
95 # none          no input/output
96 IO_TYPE=stdio
97 #IN_TYPE=stdio
98 #OUT_TYPE=stdio
99
100 # A list of all tests
101 TESTS="1 2 3 4 5 6 7 8 9 10"
102
103 # A list of public tests (executed by submit and check scripts)
104 SAMPLE_TESTS="0"
105
106 # Number of points per test
107 POINTS_PER_TEST=1
108
109 # Time limit in seconds (can be fractional, but beware of noise)
110 TIME_LIMIT=10
111
112 # Memory limit in kilobytes
113 MEM_LIMIT=16384
114
115 # Stack size limit in kilobytes (0=limited only by MEM_LIMIT)
116 STACK_LIMIT=0
117
118 # Command used for filtering of program output (optional)
119 # If turned on, program output (*.raw) is ran through this filter and the
120 # checkers are applied to the output of the filter (*.out).
121 # Can exit with code 1 if there is a syntax error in the output.
122 #OUTPUT_FILTER='tr -d '\''\r'\'' <$TDIR/$TEST.raw >$TDIR/$TEST.out'
123
124 # Command used to check output syntax (optional)
125 # Returns exit code 1 if syntax is wrong, 0 if correct
126 # fd1 is connect to evaluator log, feel free to log anything
127 # fd2 is an optional one-line verdict
128 #SYNTAX_CHECK='grep -v -- - $TDIR/$TEST.out'
129
130 # Command used to check output correctness
131 # Returns exit code 1 if output is incorrect, 0 if correct
132 # fd1 is connect to evaluator log, feel free to log anything
133 # fd2 is an optional one-line verdict
134 # The checker can generate $TDIR/$TEST.pts to assign points irregularly
135 OUTPUT_CHECK='diff -bBu $TDIR/$TEST.ok $TDIR/$TEST.out'
136
137 # Checker for interactive tasks
138 # Returns exit code 1 if test failed, 0 if passed
139 # fd0 and fd1 are connected to fd1 and fd0 of the program tested
140 # fd2 is an optional one-line verdict
141 # The checker can generate $TDIR/$TEST.pts to assign points irregularly
142 #IC_CHECK='$PDIR/checker $PDIR/$TEST.in $PDIR/$TEST.chk'
143
144 # Sandbox options used when testing
145 TEST_SANDBOX_OPTS='-a2 -f -m$MEM_LIMIT -k$STACK_LIMIT -t$TIME_LIMIT $LANG_SANDBOX_OPTS $BOX_EXTRAS'
146
147 # Extra options to be overridden in task configuration
148 BOX_EXTRAS=
149
150 ### Debugging and testing
151
152 # DEBUG: Let `ev' run sample tests, too.
153 #EV_SAMPLE=1
154
155 # DEBUG: Run `pedant' on all input data. Set either to `1' or to pedant's options.
156 #EV_PEDANT=1
157
158 # DEBUG: Skip checks (useful when generating output files by running model solution)
159 #EV_NOCHECK=1
160
161 # DEBUG: Skip output filters (if you suspect they are buggy)
162 #EV_NOFILTER=1
163
164 ### Variables overrides (most variables can be overridden for specific tests or source extensions):
165
166 #EXT_pas_TIME_LIMIT=100
167 #TEST_1_TIME_LIMIT=100
168 #EXT_pas_TEST_1_TIME_LIMIT=100
169
170 ### Reserved for use by external applications
171
172 #TEST_x_COMMENT="Description of the test case"