From: Marius Gavrilescu Date: Sat, 14 Feb 2015 07:54:37 +0000 (+0200) Subject: Add pretest support (untested) X-Git-Tag: 5999.000_005~35 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=da822e3c76d3bee2a3318ddc44bcce6ee1e30ca2;p=gruntmaster-daemon.git Add pretest support (untested) --- diff --git a/lib/Gruntmaster/Daemon.pm b/lib/Gruntmaster/Daemon.pm index 7b41d66..8430d18 100644 --- a/lib/Gruntmaster/Daemon.pm +++ b/lib/Gruntmaster/Daemon.pm @@ -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},