From 6d1f2d942e383e6f5acb59511caccb425ea8db85 Mon Sep 17 00:00:00 2001 From: Sergiu Date: Thu, 21 Jan 2016 05:32:46 +0200 Subject: [PATCH] Add Julia --- gruntmaster-compile | 7 ++++++- lib/Gruntmaster/Daemon.pm | 3 ++- t/01-jobs.t | 3 ++- t/problems/hello/tests/julia/meta.yml | 7 +++++++ t/problems/hello/tests/julia/prog.jl | 1 + 5 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 t/problems/hello/tests/julia/meta.yml create mode 100644 t/problems/hello/tests/julia/prog.jl diff --git a/gruntmaster-compile b/gruntmaster-compile index 78c4745..794b514 100755 --- a/gruntmaster-compile +++ b/gruntmaster-compile @@ -30,10 +30,11 @@ given ($format){ exec 'ghc', qw/-DONLINE_JUDGE -Wall -O2 -o/, $basename, $name when 'HASKELL'; exec 'rustc', qw/-O -o/, $basename, $name when 'RUST'; - when ([qw/GOLFSCRIPT PERL PYTHON RUBY SBCL/]){ + when ([qw/GOLFSCRIPT JULIA PERL PYTHON RUBY SBCL/]){ open IN, '<', $name; open OUT, '>', $basename; print OUT "#!/usr/bin/golfscript\n" if $_ eq 'GOLFSCRIPT'; + print OUT "#!/usr/bin/julia -O\n" if $_ eq 'JULIA'; print OUT "#!/usr/bin/perl\n" if $_ eq 'PERL'; print OUT "#!/usr/bin/python\n" if $_ eq 'PYTHON'; print OUT "#!/usr/bin/ruby\n" if $_ eq 'RUBY'; @@ -84,6 +85,10 @@ Compile commands for each format: javac $input +=item JULIA + + cp $input $output + =item PASCAL fpc -dONLINE_JUDGE -O2 $input diff --git a/lib/Gruntmaster/Daemon.pm b/lib/Gruntmaster/Daemon.pm index b64d56a..db2c757 100644 --- a/lib/Gruntmaster/Daemon.pm +++ b/lib/Gruntmaster/Daemon.pm @@ -24,8 +24,9 @@ use constant FORMAT_EXTENSION => { GOLANG => 'go', GOLFSCRIPT => 'gs', HASKELL => 'hs', - MONO => 'cs', JAVA => 'java', + JULIA => 'jl', + MONO => 'cs', PASCAL => 'pas', PERL => 'pl', PYTHON => 'py', diff --git a/t/01-jobs.t b/t/01-jobs.t index d178f85..1270358 100644 --- a/t/01-jobs.t +++ b/t/01-jobs.t @@ -24,6 +24,7 @@ use constant COMPILER => { GOLFSCRIPT golfscript MONO gmcs JAVA javac + JULIA julia PASCAL fpc GOLANG go GCCGO gccgo @@ -34,7 +35,7 @@ use constant COMPILER => { RUST rustc SBCL sbcl/}; -my %needs_fork = map { $_ => 1 } qw/GOLANG GOLFSCRIPT GCCGO JAVA RUBY/; +my %needs_fork = map { $_ => 1 } qw/GOLANG GOLFSCRIPT GCCGO JAVA JULIA RUBY/; my $loglevel = $ENV{TEST_LOG_LEVEL} // ($ENV{TEST_VERBOSE} ? 'TRACE' : 'OFF'); my $log_conf = <