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