From: Tomas Gavenciak Date: Wed, 21 May 2008 13:06:56 +0000 (+0200) Subject: Introduced IO_TYPE=dir. X-Git-Tag: python-dummy-working~177 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=9eeb7ab35587b487750b27aa8df001e21fc3272c;p=eval.git Introduced IO_TYPE=dir. --- diff --git a/eval/eval.cf b/eval/eval.cf index da30f81..24d6593 100644 --- a/eval/eval.cf +++ b/eval/eval.cf @@ -93,6 +93,8 @@ TASK_TYPE=file # 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, +# can contain .stdin, which will be aviable as program stdin # none no input/output IO_TYPE=stdio #IN_TYPE=stdio diff --git a/eval/libeval.sh b/eval/libeval.sh index 1e59e51..d3d0e96 100644 --- a/eval/libeval.sh +++ b/eval/libeval.sh @@ -305,6 +305,15 @@ function test-prolog ;; none) echo "Input file: " ;; + dir) echo "Input file: files in directory $PDIR/$TEST.in/" + [ -d $PDIR/$TEST.in ] || die "Not a directory: $PDIR/$TEST.in" + # TODO: recursive ln to $TDIR + cp -r $PDIR/$TEST.in $TDIR/$TEST.in + cp -r $PDIR/$TEST.in/* $BOXDIR/ + # Can have .stdin, but empty by default + touch $BOXDIR/.stdin + BOX_EXTRAS="$BOX_EXTRAS -i.stdin" + ;; *) die "Unknown IN_TYPE $IN_TYPE" ;; esac