Don't check mkrun_runner arguments for definedness twice
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 8 Feb 2015 14:11:44 +0000 (16:11 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 8 Feb 2015 14:11:44 +0000 (16:11 +0200)
lib/Gruntmaster/Daemon/Runner/File.pm
lib/Gruntmaster/Daemon/Runner/Interactive.pm
lib/Gruntmaster/Daemon/Runner/Verifier.pm

index 1a4829af01619227ddd514df1eed03b687f2abb3..42768582ff596077a7b4f851ed705fb28ab4abbd 100644 (file)
@@ -16,7 +16,7 @@ our $VERSION = '5999.000_004';
 sub run{
        my ($test, $meta) = @_;
        get_logger->trace("Running on test $test...");
-       $meta->{files}{prog}{run}->($meta->{files}{prog}{name}, fds => [qw/0 input 1 >output/], map {defined $meta->{$_} ? ($_ => $meta->{$_}) : () } qw/timeout olimit mlimit/);
+       $meta->{files}{prog}{run}->($meta->{files}{prog}{name}, fds => [qw/0 input 1 >output/], map { $_ => $meta->{$_} } qw/timeout olimit mlimit/);
        my $out = slurp 'output';
        my $ok;
        if (exists $meta->{okfile}) { # uncoverable branch false
index dfdf95b5982e93c4a540c555e1690f80db91c97e..f87e88cc9a625bb1d9d2f3e01fae5993595265a6 100644 (file)
@@ -30,7 +30,7 @@ sub run{
        if ($ret) {
                try {
                        my @fds = $ENV{GRUNTMASTER_VM} ? qw,0 /dev/ttyS1 1 >/dev/ttyS1, : qw/0 fifo1 1 >fifo2/;
-                       $meta->{files}{prog}{run}->($meta->{files}{prog}{name}, fds => \@fds, map {defined $meta->{$_} ? ($_ => $meta->{$_}) : () } qw/timeout mlimit/);
+                       $meta->{files}{prog}{run}->($meta->{files}{prog}{name}, fds => \@fds, map { $_ => $meta->{$_} } qw/timeout mlimit/);
                } catch {
                        die $_ ## no critic (RequireCarping)
                } finally {
@@ -40,7 +40,7 @@ sub run{
        } else {
                try {
                        my @fds = $ENV{GRUNTMASTER_VM} ? qw,1 >/dev/ttyS1 0 /dev/ttyS1, : qw/1 >fifo1 0 fifo2/;
-                       $meta->{files}{ver}{run}->($meta->{files}{ver}{name}, fds => [@fds, qw,4 >result,], args => [$test], map {defined $meta->{$_} ? ($_ => $meta->{$_}) : () } qw/timeout mlimit/);
+                       $meta->{files}{ver}{run}->($meta->{files}{ver}{name}, fds => [@fds, qw,4 >result,], args => [$test], map { $_ => $meta->{$_} } qw/timeout mlimit/);
                } catch {
                        exit 1;
                };
index 7111f6baadc6058ac46b01ab86f12cca48181c75..463fd7101eade579fc3c3cdf523ab6733431cf12 100644 (file)
@@ -16,7 +16,7 @@ our $VERSION = '5999.000_004';
 sub run{
        my ($test, $meta) = @_;
        get_logger->trace("Running on test $test...");
-       $meta->{files}{prog}{run}->($meta->{files}{prog}{name}, fds => [qw/0 input 1 >output/], map {defined $meta->{$_} ? ($_ => $meta->{$_}) : () } qw/timeout olimit mlimit/);
+       $meta->{files}{prog}{run}->($meta->{files}{prog}{name}, fds => [qw/0 input 1 >output/], map { $_ => $meta->{$_} } qw/timeout olimit mlimit/);
 
        try {
                $meta->{files}{ver}{run}->($meta->{files}{ver}{name}, fds => [qw/0 input 3 output 1 >result/], args => [$test]);
This page took 0.013705 seconds and 4 git commands to generate.