1 # Configuration file for the MO Evaluator
2 # (c) 2001--2008 Martin Mares <mj@ucw.cz>
4 # The root of the whole directory hierarchy
7 # User and group used by the evaluator itself
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"
19 ### Programming language settings
21 # Known source file extensions
22 EXTENSIONS="c cc C cpp p pas"
24 # Some of the extensions can be aliases for other extensions
29 ## Variables which control compilation and execution
30 ## (see below for values for individual languages)
32 # Command used to run the compiler
35 # Sandbox options used when compiling
36 COMP_SANDBOX_OPTS='-m262144 -w60 -e -i/dev/null'
38 # Extra per-language sandbox options used when testing
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.
45 # Hooks which can alter the contents of the sandbox in $BOXDIR before/after compilation/running
51 ## Settings for individual languages
54 EXT_c_COMP='/usr/bin/gcc -std=gnu99 -O2 -g -o $EXE $EXTRA_CFLAGS $SRC -lm'
58 EXT_cpp_COMP='/usr/bin/g++ -O2 -g -o $EXE $EXTRA_CXXFLAGS $SRC -lm'
62 EXT_pas_COMP='/usr/bin/fpc -Ci -Cr -Ct -g -O2 -Sg -o$EXE $EXTRA_PFLAGS $SRC'
64 EXT_pas_EXIT_CODE_HOOK=fpc-exit-code
66 ### Per-task configuration variables (default values, override in per-task config)
68 # List of extra files needed for compilation. They are copied to the compiler
69 # sandbox from the problem's directory.
70 #COMP_EXTRAS="extras.h"
72 ## Tester settings (most can be overriden in per-test config):
74 # The following variables are automatically set by the evaluator:
75 # PROBLEM name of the problem
76 # HDIR home directory of the evaluator (i.e., this file is $HDIR/config)
77 # PDIR directory containing problem data
78 # SDIR directory containing contestant's solution
79 # TDIR directory containing testing results
80 # TMPDIR directory containing temporary files
81 # TEST name of the current test
84 # offline off-line task
85 # interactive interactive task communicating via stdio with a testing program
86 # open-data open-data task (i.e., we don't submit program, but output files)
89 # I/O type (IO_TYPE sets defaults for IN_TYPE and OUT_TYPE)
90 # file input from $PROBLEM.in, output to $PROBLEM.out (possible even for interactive tasks)
91 # stdio input from stdin, output to stdout
92 # none no input/output
98 TESTS="1 2 3 4 5 6 7 8 9 10"
100 # A list of public tests (executed by submit and check scripts)
103 # Number of points per test
106 # Time limit in seconds (can be fractional, but beware of noise)
109 # Memory limit in kilobytes
112 # Command used for filtering of program output (optional)
113 # If turned on, program output (*.raw) is ran through this filter and the
114 # checkers are applied to the output of the filter (*.out).
115 # Can exit with code 1 if there is a syntax error in the output.
116 #OUTPUT_FILTER='tr -d '\''\r'\'' <$TDIR/$TEST.raw >$TDIR/$TEST.out'
118 # Command used to check output syntax (optional)
119 # Returns exit code 1 if syntax is wrong, 0 if correct
120 # fd1 is connect to evaluator log, feel free to log anything
121 # fd2 is an optional one-line verdict
122 #SYNTAX_CHECK='grep -v -- - $TDIR/$TEST.out'
124 # Command used to check output correctness
125 # Returns exit code 1 if output is incorrect, 0 if correct
126 # fd1 is connect to evaluator log, feel free to log anything
127 # fd2 is an optional one-line verdict
128 # The checker can generate $TDIR/$TEST.pts to assign points irregularly
129 OUTPUT_CHECK='diff -bBu $TDIR/$TEST.ok $TDIR/$TEST.out'
131 # Checker for interactive tasks
132 # Returns exit code 1 if test failed, 0 if passed
133 # fd0 and fd1 are connected to fd1 and fd0 of the program tested
134 # fd2 is an optional one-line verdict
135 # The checker can generate $TDIR/$TEST.pts to assign points irregularly
136 #IC_CHECK='$PDIR/checker $PDIR/$TEST.in $PDIR/$TEST.chk'
138 # Sandbox options used when testing
139 TEST_SANDBOX_OPTS='-a2 -f -m$MEM_LIMIT -t$TIME_LIMIT $LANG_SANDBOX_OPTS $BOX_EXTRAS'
141 # Extra options to be overridden in task configuration
144 ### Debugging and testing
146 # DEBUG: Let `ev' run sample tests, too.
149 # DEBUG: Run `pedant' on all input data. Set either to `1' or to pedant's options.
152 # DEBUG: Skip checks (useful when generating output files by running model solution)
155 # DEBUG: Skip output filters (if you suspect they are buggy)
158 ### Variables overrides (most variables can be overridden for specific tests or source extensions):
160 #EXT_pas_TIME_LIMIT=100
161 #TEST_1_TIME_LIMIT=100
162 #EXT_pas_TEST_1_TIME_LIMIT=100