]> mj.ucw.cz Git - moe.git/blob - t/config
Added syntax for config files (to be reviewed)
[moe.git] / t / config
1 # HOME set automatically
2 # CONTESTANT set automatically
3 # TASK set automatically
4
5 PDIR="${HOME}/problems/${TASK}"
6 SDIR="${HOME}/solutions/${CONTESTANT}/${TASK}"
7 TDIR="${HOME}/testing/${CONTESTANT}/${TASK}"
8
9 TESTCASE_IN=${TEST}.in
10 TESTCASE_OUT=${TEST}.out
11 TESTCASE_OK=${TEST}.ok
12 TESTCASE_STATUS=${TEST}.stat
13 TESTCASE_RAW=${TEST}.raw
14 # backward compatibility
15 TESTCASE_PTS=${TEST}.pts
16
17 DEBUG=1
18
19 # HOOKS
20 # TESTCASE_HOOKS
21
22 ### Programming language settings
23
24 # Known source file extensions
25 EXTENSIONS="c cc C cpp p pas"
26
27 # Some of the extensions can be aliases for other extensions
28 ALIAS_EXT_cc=cpp
29 ALIAS_EXT_C=cpp
30 ALIAS_EXT_p=pas
31
32 # SRC is auto
33
34 ## Variables which control compilation and execution
35 ## (see below for values for individual languages)
36
37 # Command used to run the compiler
38 COMP=false
39
40 # Sandbox options used when compiling
41 COMP_SANDBOX_OPTS="-m262144 -w60 -e -i/dev/null"
42
43 EXE=$TASK
44
45 # Command used to execute the compiled program, may be ./$PROGRAM (default) or an
46 # interpreter with $PROGRAM as a parameter.
47 TEST_EXEC_CMD=./$EXE
48
49 ## Settings for individual languages
50
51 # C
52 EXT_c_COMP="/usr/bin/gcc -std=gnu99 -O2 -g -o $EXE $EXTRA_CFLAGS $SRC -lm"
53 EXTRA_CFLAGS=
54
55 # C++
56 EXT_cpp_COMP="/usr/bin/g++ -O2 -g -o $EXE $EXTRA_CXXFLAGS $SRC -lm"
57 EXTRA_CXXFLAGS=
58
59 # Pascal
60 EXT_pas_COMP="/usr/bin/fpc -Ci -g -O2 -Sg -o$EXE $EXTRA_PFLAGS $SRC"
61 EXTRA_PFLAGS=
62
63 ### Per-task configuration variables (default values, override in per-task config)
64
65 # List of extra files needed for compilation. They are copied to the compiler
66 # sandbox from the problem's directory. XXX: or tdir
67 #COMP_EXTRAS="extras.h"
68
69 # Task type:
70 # batch         off-line task
71 # interactive   interactive task communicating via stdio with a testing program
72 # open-data     open-data task (i.e., we don't submit program, but output files)
73 TASK_TYPE=batch
74
75 # I/O type (IO_TYPE sets defaults for IN_TYPE and OUT_TYPE)
76 # file          input from $PROBLEM.in, output to $PROBLEM.out (possible even for interactive tasks)
77 # stdio         input from stdin, output to stdout
78 # dir           input from all files in the directory $TEST.in; these are copied to $BOXDIR
79 #               and if they include .stdin, it will be available as program's std. input.
80 # none          no input/output
81 IO_TYPE=stdio
82 #IN_TYPE=stdio
83 #OUT_TYPE=stdio
84
85 IN_NAME=$TASK.in
86 OUT_NAME=$TASK.out
87
88 # A list of all tests
89 TESTS="1 2 3 4 5 6 7 8 9 10"
90
91 # A list of public tests (executed by submit and check scripts)
92 SAMPLE_TESTS="0"
93
94 # Number of points per test
95 POINTS_PER_TEST=1
96
97 # Time limit in seconds (can be fractional, but beware of noise)
98 TIME_LIMIT=10
99
100 # Memory limit in kilobytes
101 MEM_LIMIT=16384
102
103 # Stack size limit in kilobytes (0=limited only by MEM_LIMIT)
104 STACK_LIMIT=0
105
106 # Command used for filtering of program output (optional)
107 # If turned on, program output (*.raw) is ran through this filter and the
108 # checkers are applied to the output of the filter (*.out).
109 # Can exit with code 1 if there is a syntax error in the output.
110 #OUTPUT_FILTER=tr -d '\r' <$TDIR/$TEST.raw >$TDIR/$TEST.out
111
112 # Command used to check output syntax (optional)
113 # Returns exit code 1 if syntax is wrong, 0 if correct
114 # fd1 is connect to evaluator log, feel free to log anything
115 # fd2 is an optional one-line verdict
116 #SYNTAX_CHECK=grep -v -- - $TDIR/$TEST.out
117
118 # Command used to check output correctness
119 # Returns exit code 1 if output is incorrect, 0 if correct
120 # fd1 is connect to evaluator log, feel free to log anything
121 # fd2 is an optional one-line verdict
122 # The checker can generate $TDIR/$TEST.pts to assign points irregularly
123 OUTPUT_CHECK=diff -bBu $TDIR/$TEST.ok $TDIR/$TEST.out
124
125 # Checker for interactive tasks
126 # Returns exit code 1 if test failed, 0 if passed
127 # fd0 and fd1 are connected to fd1 and fd0 of the program tested
128 # fd2 is an optional one-line verdict
129 # The checker can generate $TDIR/$TEST.pts to assign points irregularly
130 #IC_CHECK=$PDIR/checker $PDIR/$TEST.in $PDIR/$TEST.chk
131
132 # Sandbox options used when testing
133 TEST_SANDBOX_OPTS=-a2 -f -m$MEM_LIMIT -k$STACK_LIMIT -t$TIME_LIMIT $BOX_EXTRAS $BOX_IO_OPTS
134
135 # Extra options to be overridden in task configuration
136 BOX_EXTRAS=
137
138 ### Hook priorities:
139
140 # Task pipeline for batch and interactive tasks:
141 #       100     compile-init
142 #       150     compile-run
143 #       190     compile-done
144 #       200     batch-tests
145
146 # Test pipeline:
147 #       000     setup           copy input and correct output to $TDIR
148 #       100     prepare         copy input and executables to the sandbox
149 #       200     run             run inside the sandbox
150 #       300     collect         copy output out of the sandbox
151 #       400     filter          filter the output ($OUTPUT_FILTER)
152 #       500     syntax          check syntax of the output ($SYNTAX_CHECK)
153 #       600     judge           check correctness of the output ($OUTPUT_CHECK)
154 #       700     points          award $POINTS_PER_TEST points unless already done