From c88da74dc640492d03acd18721be8b250bf82a2d Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sat, 14 Feb 2015 18:18:53 +0200 Subject: [PATCH] Add SBCL --- gruntmaster-compile | 6 ++++++ lib/Gruntmaster/Daemon.pm | 1 + t/01-jobs.t | 3 ++- t/problems/hello/tests/sbcl/meta.yml | 7 +++++++ t/problems/hello/tests/sbcl/prog.l | 1 + 5 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 t/problems/hello/tests/sbcl/meta.yml create mode 100644 t/problems/hello/tests/sbcl/prog.l diff --git a/gruntmaster-compile b/gruntmaster-compile index 5af89b9..af72ff8 100755 --- a/gruntmaster-compile +++ b/gruntmaster-compile @@ -28,6 +28,12 @@ given ($format){ exec 'go', qw/build -compiler gc/, $name when 'GOLANG'; exec 'go', qw/build -compiler gccgo/, $name, when 'GCCGO'; exec 'ghc', qw/-DONLINE_JUDGE -Wall -O2 -o/, $basename, $name when 'HASKELL'; + when ('SBCL') { + system 'sbcl', '--noinform', '--eval', qq/(compile-file "$name")/, '--quit' and die "sbcl failed: errno=$! return=$?"; + rename "$basename.fasl", $basename; + chmod 0755, $basename; + exit + } when ([qw/PERL PYTHON/]){ open IN, '<', $name; diff --git a/lib/Gruntmaster/Daemon.pm b/lib/Gruntmaster/Daemon.pm index 958395c..67fc548 100644 --- a/lib/Gruntmaster/Daemon.pm +++ b/lib/Gruntmaster/Daemon.pm @@ -27,6 +27,7 @@ use constant FORMAT_EXTENSION => { PASCAL => 'pas', PERL => 'pl', PYTHON => 'py', + SBCL => 'l', }; ################################################## diff --git a/t/01-jobs.t b/t/01-jobs.t index f44a1e8..3d308c7 100644 --- a/t/01-jobs.t +++ b/t/01-jobs.t @@ -28,7 +28,8 @@ use constant COMPILER => { GCCGO gccgo HASKELL ghc PERL perl - PYTHON python/}; + PYTHON python + SBCL sbcl/}; my $loglevel = $ENV{TEST_LOG_LEVEL} // ($ENV{TEST_VERBOSE} ? 'TRACE' : 'OFF'); my $log_conf = <