]> mj.ucw.cz Git - eval.git/commitdiff
Introduced IO_TYPE=dir.
authorTomas Gavenciak <gavento@atrey.karlin.mff.cuni.cz>
Wed, 21 May 2008 13:06:56 +0000 (15:06 +0200)
committerMartin Mares <mj@ucw.cz>
Wed, 21 May 2008 13:06:56 +0000 (15:06 +0200)
eval/eval.cf
eval/libeval.sh

index da30f81762148bffc6908df06eba0e2fa14b5ec7..24d6593e59d07a9748f5a1d5d4c6ba4c963edc13 100644 (file)
@@ -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
index 1e59e512ea6cf8b36268f9e0fcc861eb832e6152..d3d0e96b0093826b15dfb9c135aa0477848d9cc1 100644 (file)
@@ -305,6 +305,15 @@ function test-prolog
                        ;;
                none)   echo "Input file: <none>"
                        ;;
+               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