]> iEval git - gruntmaster-daemon.git/commitdiff
Add SBCL
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 14 Feb 2015 16:18:53 +0000 (18:18 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 14 Feb 2015 16:19:25 +0000 (18:19 +0200)
gruntmaster-compile
lib/Gruntmaster/Daemon.pm
t/01-jobs.t
t/problems/hello/tests/sbcl/meta.yml [new file with mode: 0644]
t/problems/hello/tests/sbcl/prog.l [new file with mode: 0644]

index 5af89b96dfc0dbecc086bc55daa6c118e0c61fa2..af72ff81f211197c9d15bf5ab3480c509de94566 100755 (executable)
@@ -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;
index 958395c0bbabb80da7feccf43912fec327a195b6..67fc5489ee3a68c52b3137a8d3ae86924e9a0c6e 100644 (file)
@@ -27,6 +27,7 @@ use constant FORMAT_EXTENSION => {
        PASCAL => 'pas',
        PERL => 'pl',
        PYTHON => 'py',
+       SBCL => 'l',
 };
 
 ##################################################
index f44a1e893c631878f0578d865d5de3a2aa4de96f..3d308c7912257ff4814e76a410b8616d625a5459 100644 (file)
@@ -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 = <<CONF;
diff --git a/t/problems/hello/tests/sbcl/meta.yml b/t/problems/hello/tests/sbcl/meta.yml
new file mode 100644 (file)
index 0000000..af66138
--- /dev/null
@@ -0,0 +1,7 @@
+test_name: SBCL
+test_description: Hello world in Common Lisp
+problem: hello
+files:
+  prog:
+    format: SBCL
+    name: prog.l
diff --git a/t/problems/hello/tests/sbcl/prog.l b/t/problems/hello/tests/sbcl/prog.l
new file mode 100644 (file)
index 0000000..92eec4c
--- /dev/null
@@ -0,0 +1 @@
+(write-line "Hello World!")
This page took 0.035614 seconds and 4 git commands to generate.