]>
iEval git - gruntmaster-daemon.git/blob - lib/Gruntmaster/Daemon/Generator/File.pm
132b902356f8b259d710eb07056a1280dcf36012
1 package Gruntmaster
::Daemon
::Generator
::File
;
7 use File
::Copy qw
/copy/;
8 use File
::Slurp qw
/write_file/;
9 use Log
::Log4perl qw
/get_logger/;
11 our $VERSION = "5999.000_002";
13 ##################################################
16 my ($test, $meta) = @_;
17 get_logger
->trace("Generating test $test ...");
18 if (exists $meta->{infile
}) {
19 write_file
'input', $meta->{infile
}[$test - 1]
21 my $ct = defined $Gruntmaster::Data
::contest ?
"ct/$Gruntmaster::Data::contest" : '';
22 copy
"/var/lib/gruntmasterd/$ct/pb/$meta->{problem}/$test.in", 'input'
33 Gruntmaster::Daemon::Generator::File - Generate tests from files
37 use Gruntmaster::Daemon::Generator::File;
38 Gruntmaster::Daemon::Generator::File->generate(5, $meta);
42 Gruntmaster::Daemon::Generator::File is a static test generator. Test C<$i> is C<< $meta->{infile}[$i - 1] >>.
46 Marius Gavrilescu E<lt>marius@ieval.roE<gt>
48 =head1 COPYRIGHT AND LICENSE
50 Copyright (C) 2014 by Marius Gavrilescu
52 This library is free software: you can redistribute it and/or modify
53 it under the terms of the GNU Affero General Public License as published by
54 the Free Software Foundation, either version 3 of the License, or
55 (at your option) any later version.
This page took 0.038359 seconds and 4 git commands to generate.