Add pretest support (untested)
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 14 Feb 2015 07:54:37 +0000 (09:54 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 14 Feb 2015 07:54:37 +0000 (09:54 +0200)
lib/Gruntmaster/Daemon.pm

index 7b41d66..8430d18 100644 (file)
@@ -111,9 +111,11 @@ sub process_job {
                                content => $job->source,
                        },
                },
-               map { $_ => $job->problem->get_column($_) } qw/generator runner judge testcnt timeout olimit/
+               map { $_ => $job->problem->get_column($_) } qw/generator runner judge precnt testcnt timeout olimit/
        };
        $meta->{tests} = decode_json $job->problem->tests if $meta->{runner} eq 'File';
+       delete $meta->{precnt} if $job->problem->is_in_archive;
+       $meta->{testcnt} = $meta->{precnt} if $meta->{precnt};
 
        $meta->{files}{ver} = {
                name => 'ver.' . FORMAT_EXTENSION->{$job->problem->verformat},
@@ -123,6 +125,7 @@ sub process_job {
 
        process $meta;
 
+       $meta->{result_text} .= ' (pretests)' if $meta->{precnt};
        $job->update({
                result => $meta->{result},
                result_text => $meta->{result_text},
This page took 0.025168 seconds and 4 git commands to generate.