]> iEval git - gruntmaster-daemon.git/commitdiff
Support input for interactive problem verifiers
authorMarius Gavrilescu <marius@ieval.ro>
Wed, 10 Feb 2016 22:41:30 +0000 (22:41 +0000)
committerMarius Gavrilescu <marius@ieval.ro>
Wed, 10 Feb 2016 22:41:30 +0000 (22:41 +0000)
lib/Gruntmaster/Daemon/Generator/Undef.pm
lib/Gruntmaster/Daemon/Runner/Interactive.pm

index 17d1622155c90a0a5fd3b7eaa556b9fc38a30594..15f3babe3df1c633edaa6c8f2055dd15dec532b1 100644 (file)
@@ -5,13 +5,15 @@ use strict;
 use warnings;
 
 use Log::Log4perl qw/get_logger/;
+use File::Slurp qw/write_file/;
 
 our $VERSION = '5999.000_005';
 
 ##################################################
 
 sub generate{
-       get_logger->trace("Pretending to generate test $_[0]...");
+       get_logger->trace("Generating empty test $_[0]...");
+       write_file 'input', '';
 }
 
 1;
index d16e08e12a4f7d6b894d942a851d2d86e872de05..3595e4a6dcb08027397a11c349b6c4a64224f994 100644 (file)
@@ -27,7 +27,7 @@ sub run{
        my $fail;
        @fds = $ENV{GRUNTMASTER_VM} ? qw,1 >/dev/ttyS1 0 /dev/ttyS1, : qw/1 >fifo1 0 fifo2/;
        try {
-               $meta->{files}{ver}{run}->($meta->{files}{ver}{name}, fds => [@fds, qw,4 >result,], args => [$test], map { $_ => $meta->{$_} } qw/timeout mlimit/);
+               $meta->{files}{ver}{run}->($meta->{files}{ver}{name}, fds => [@fds, qw,3 input 4 >result,], args => [$test], map { $_ => $meta->{$_} } qw/timeout mlimit/);
        } catch {
                $fail = [WA, 'Wrong Answer'];
        };
This page took 0.028879 seconds and 4 git commands to generate.