From da822e3c76d3bee2a3318ddc44bcce6ee1e30ca2 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sat, 14 Feb 2015 09:54:37 +0200 Subject: [PATCH] Add pretest support (untested) --- lib/Gruntmaster/Daemon.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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}, -- 2.39.2