X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=t%2Fconfig;h=0c5c43f45085418f2de61de84e9b1032e4e38e8c;hb=dcc852db06f099b6c96b681c79832d41777da334;hp=c75c2d53e006deaddbef5037ea82c72b4bd3050a;hpb=9587bd376c403e16a0f79c9046eecc9b8f543cb8;p=moe.git diff --git a/t/config b/t/config index c75c2d5..0c5c43f 100644 --- a/t/config +++ b/t/config @@ -1,13 +1,19 @@ # HOME set automatically # CONTESTANT set automatically # TASK set automatically -## FIXME: Rename? -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 @@ -19,3 +25,108 @@ 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= +