]> iEval git - gruntmaster-daemon.git/commitdiff
Add contest support to filesystem infiles/okfiles
authorMarius Gavrilescu <marius@ieval.ro>
Mon, 10 Feb 2014 21:18:51 +0000 (23:18 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Mon, 10 Feb 2014 21:19:01 +0000 (23:19 +0200)
lib/Gruntmaster/Daemon/Generator/File.pm
lib/Gruntmaster/Daemon/Runner/File.pm

index fb1dc5e8d900ac2b32550a81abd7768b61aa0185..8c2ed5b26cc45ba13737a17e37ba906bcc9df143 100644 (file)
@@ -18,7 +18,8 @@ sub generate{
   if (exists $meta->{infile}) {
          write_file 'input', $meta->{infile}[$test - 1]
   } else {
-         copy "/var/lib/gruntmasterd/pb/$meta->{problem}/$test.in", 'input'
+         my $ct = defined $Gruntmaster::Data::contest ? "ct/$Gruntmaster::Data::contest" : '';
+         copy "/var/lib/gruntmasterd/$ct/pb/$meta->{problem}/$test.in", 'input'
   }
 }
 
index 34ea04d80558fb13b7d7d13f41a401c2a0c14d0d..7f67fb301a35a7b359c879a6c374bd5803e3bce6 100644 (file)
@@ -21,7 +21,8 @@ sub run{
   if (exists $meta->{okfile}) {
          $ok = $meta->{okfile}[$test - 1]
   } else {
-         $ok = slurp "/var/lib/gruntmasterd/pb/$meta->{problem}/$test.ok"
+         my $ct = defined $Gruntmaster::Data::contest ? "ct/$Gruntmaster::Data::contest" : '';
+         $ok = slurp "/var/lib/gruntmasterd/$ct/pb/$meta->{problem}/$test.ok"
   }
 
   $out =~ s/^\s+//;
This page took 0.031491 seconds and 4 git commands to generate.