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 17d1622..15f3bab 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 d16e08e..3595e4a 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.030972 seconds and 4 git commands to generate.