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