]> iEval git - gruntmaster-daemon.git/blame - lib/Gruntmaster/Daemon/Runner/Verifier.pm
Initial commit
[gruntmaster-daemon.git] / lib / Gruntmaster / Daemon / Runner / Verifier.pm
CommitLineData
5c5cd38a
MG
1package Gruntmaster::Daemon::Runner::Verifier;
2
3use 5.014000;
4use strict;
5use warnings;
6
7use Gruntmaster::Daemon::Constants qw/WA/;
8use File::Slurp qw/slurp/;
9use Log::Log4perl qw/get_logger/;
10use Try::Tiny;
11
12##################################################
13
14sub run{
15 my ($test, $meta) = @_;
16 get_logger->trace("Running on test $test...");
17 $meta->{files}{prog}{run}->($meta->{files}{prog}{name}, fds => [qw/0 input 1 >output/], map {defined $meta->{$_} ? ($_ => $meta->{$_}) : () } qw/timeout olimit mlimit/);
18
19 try {
20 $meta->{files}{ver}{run}->($meta->{files}{ver}{name}, fds => [qw/0 input 3 output 1 >result/]);
21 } catch {
22 die [WA, "Wrong answer"]
23 };
24 scalar slurp 'result';
25}
26
271
This page took 0.027356 seconds and 4 git commands to generate.