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 5af89b9..af72ff8 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 958395c..67fc548 100644 (file)
@@ -27,6 +27,7 @@ use constant FORMAT_EXTENSION => {
        PASCAL => 'pas',
        PERL => 'pl',
        PYTHON => 'py',
+       SBCL => 'l',
 };
 
 ##################################################
index f44a1e8..3d308c7 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.027591 seconds and 4 git commands to generate.