]> mj.ucw.cz Git - eval.git/blobdiff - t/config
Batch task testing works (sort of)
[eval.git] / t / config
index 910dfcb1ec99bc29ca8a7a59ac6347eda485751c..0c5c43f45085418f2de61de84e9b1032e4e38e8c 100644 (file)
--- a/t/config
+++ b/t/config
@@ -1,8 +1,132 @@
 # HOME set automatically
 # CONTESTANT set automatically
 # TASK set automatically
-TASK_DIR="${HOME}/problems/${TASK}"
-SOL_DIR="${HOME}/solutions/${CONTESTANT}/${TASK}"
-TEST_DIR="${HOME}/testing/${CONTESTANT}/${TASK}"
+PDIR="${HOME}/problems/${TASK}"
+SDIR="${HOME}/solutions/${CONTESTANT}/${TASK}"
+TDIR="${HOME}/testing/${CONTESTANT}/${TASK}"
 
 TASK_TYPE=batch
+
+TESTCASE_IN=${TEST}.in
+TESTCASE_OUT=${TEST}.out
+TESTCASE_OK=${TEST}.ok
+
+# HOOKS
+# TESTCASE_HOOKS
+
+### Programming language settings
+
+# Known source file extensions
+EXTENSIONS="c cc C cpp p pas"
+
+# Some of the extensions can be aliases for other extensions
+ALIAS_EXT_cc=cpp
+ALIAS_EXT_C=cpp
+ALIAS_EXT_p=pas
+
+# SRC is auto
+
+## Variables which control compilation and execution
+## (see below for values for individual languages)
+
+# Command used to run the compiler
+COMP=false
+
+# Sandbox options used when compiling
+COMP_SANDBOX_OPTS="-m262144 -w60 -e -i/dev/null"
+
+EXE=$TASK
+
+# Command used to execute the compiled program, may be ./$PROGRAM (default) or an
+# interpreter with $PROGRAM as a parameter.
+TEST_EXEC_CMD=./$EXE
+
+## Settings for individual languages
+
+# C
+EXT_c_COMP="/usr/bin/gcc -std=gnu99 -O2 -g -o $EXE $EXTRA_CFLAGS $SRC -lm"
+EXTRA_CFLAGS=
+
+# C++
+EXT_cpp_COMP="/usr/bin/g++ -O2 -g -o $EXE $EXTRA_CXXFLAGS $SRC -lm"
+EXTRA_CXXFLAGS=
+
+# Pascal
+EXT_pas_COMP="/usr/bin/fpc -Ci -g -O2 -Sg -o$EXE $EXTRA_PFLAGS $SRC"
+EXTRA_PFLAGS=
+
+### Per-task configuration variables (default values, override in per-task config)
+
+# List of extra files needed for compilation. They are copied to the compiler
+# sandbox from the problem's directory. XXX: or tdir
+#COMP_EXTRAS="extras.h"
+
+# Task type:
+# batch                off-line task
+# interactive  interactive task communicating via stdio with a testing program
+# open-data    open-data task (i.e., we don't submit program, but output files)
+TASK_TYPE=batch
+
+# I/O type (IO_TYPE sets defaults for IN_TYPE and OUT_TYPE)
+# file         input from $PROBLEM.in, output to $PROBLEM.out (possible even for interactive tasks)
+# stdio                input from stdin, output to stdout
+# dir          input from all files in the directory $TEST.in; these are copied to $BOXDIR
+#              and if they include .stdin, it will be available as program's std. input.
+# none         no input/output
+IO_TYPE=stdio
+#IN_TYPE=stdio
+#OUT_TYPE=stdio
+
+IN_NAME=$TASK.in
+OUT_NAME=$TASK.out
+
+# A list of all tests
+TESTS="1 2 3 4 5 6 7 8 9 10"
+
+# A list of public tests (executed by submit and check scripts)
+SAMPLE_TESTS="0"
+
+# Number of points per test
+POINTS_PER_TEST=1
+
+# Time limit in seconds (can be fractional, but beware of noise)
+TIME_LIMIT=10
+
+# Memory limit in kilobytes
+MEM_LIMIT=16384
+
+# Stack size limit in kilobytes (0=limited only by MEM_LIMIT)
+STACK_LIMIT=0
+
+# Command used for filtering of program output (optional)
+# If turned on, program output (*.raw) is ran through this filter and the
+# checkers are applied to the output of the filter (*.out).
+# Can exit with code 1 if there is a syntax error in the output.
+#OUTPUT_FILTER=tr -d '\r' <$TDIR/$TEST.raw >$TDIR/$TEST.out
+
+# Command used to check output syntax (optional)
+# Returns exit code 1 if syntax is wrong, 0 if correct
+# fd1 is connect to evaluator log, feel free to log anything
+# fd2 is an optional one-line verdict
+#SYNTAX_CHECK=grep -v -- - $TDIR/$TEST.out
+
+# Command used to check output correctness
+# Returns exit code 1 if output is incorrect, 0 if correct
+# fd1 is connect to evaluator log, feel free to log anything
+# fd2 is an optional one-line verdict
+# The checker can generate $TDIR/$TEST.pts to assign points irregularly
+OUTPUT_CHECK=diff -bBu $TDIR/$TEST.ok $TDIR/$TEST.out
+
+# Checker for interactive tasks
+# Returns exit code 1 if test failed, 0 if passed
+# fd0 and fd1 are connected to fd1 and fd0 of the program tested
+# fd2 is an optional one-line verdict
+# The checker can generate $TDIR/$TEST.pts to assign points irregularly
+#IC_CHECK=$PDIR/checker $PDIR/$TEST.in $PDIR/$TEST.chk
+
+# Sandbox options used when testing
+TEST_SANDBOX_OPTS=-a2 -f -m$MEM_LIMIT -k$STACK_LIMIT -t$TIME_LIMIT $BOX_EXTRAS $BOX_IO_OPTS
+
+# Extra options to be overridden in task configuration
+BOX_EXTRAS=
+