From: Marius Gavrilescu Date: Sun, 8 Feb 2015 14:06:41 +0000 (+0200) Subject: Add some uncoverable directives X-Git-Tag: 5999.000_005~45 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=146dc3a758d8e09d6ef8ac09f4ccf2b9c52ed52c;p=gruntmaster-daemon.git Add some uncoverable directives --- diff --git a/lib/Gruntmaster/Daemon/Generator/File.pm b/lib/Gruntmaster/Daemon/Generator/File.pm index c5023a7..fee3ca6 100644 --- a/lib/Gruntmaster/Daemon/Generator/File.pm +++ b/lib/Gruntmaster/Daemon/Generator/File.pm @@ -15,10 +15,10 @@ our $VERSION = '5999.000_004'; sub generate{ my ($test, $meta) = @_; get_logger->trace("Generating test $test ..."); - if (exists $meta->{infile}) { + if (exists $meta->{infile}) { # uncoverable branch false write_file 'input', $meta->{infile}[$test - 1] } else { - copy "/var/lib/gruntmasterd/pb/$meta->{problem}/$test.in", 'input' + copy "/var/lib/gruntmasterd/pb/$meta->{problem}/$test.in", 'input' # uncoverable statement } } diff --git a/lib/Gruntmaster/Daemon/Runner/File.pm b/lib/Gruntmaster/Daemon/Runner/File.pm index 386b02c..1a4829a 100644 --- a/lib/Gruntmaster/Daemon/Runner/File.pm +++ b/lib/Gruntmaster/Daemon/Runner/File.pm @@ -19,10 +19,10 @@ sub run{ $meta->{files}{prog}{run}->($meta->{files}{prog}{name}, fds => [qw/0 input 1 >output/], map {defined $meta->{$_} ? ($_ => $meta->{$_}) : () } qw/timeout olimit mlimit/); my $out = slurp 'output'; my $ok; - if (exists $meta->{okfile}) { + if (exists $meta->{okfile}) { # uncoverable branch false $ok = $meta->{okfile}[$test - 1] } else { - $ok = slurp "/var/lib/gruntmasterd/pb/$meta->{problem}/$test.ok" + $ok = slurp "/var/lib/gruntmasterd/pb/$meta->{problem}/$test.ok" # uncoverable statement } $out =~ s/^\s+//;