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