t/problems/hello/tests/gccgo/prog.go
t/problems/hello/tests/golang/meta.yml
t/problems/hello/tests/golang/prog.go
+t/problems/hello/tests/golfscript/meta.yml
+t/problems/hello/tests/golfscript/prog.gs
t/problems/hello/tests/haskell/meta.yml
t/problems/hello/tests/haskell/prog.hs
t/problems/hello/tests/java/meta.yml
exec 'go', qw/build -compiler gccgo/, $name, when 'GCCGO';
exec 'ghc', qw/-DONLINE_JUDGE -Wall -O2 -o/, $basename, $name when 'HASKELL';
- when ([qw/PERL PYTHON RUBY SBCL/]){
+ when ([qw/GOLFSCRIPT PERL PYTHON RUBY SBCL/]){
open IN, '<', $name;
open OUT, '>', $basename;
+ print OUT "#!/usr/bin/golfscript\n" if $_ eq 'GOLFSCRIPT';
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';
CPP => 'cpp',
GCCGO => 'go',
GOLANG => 'go',
+ GOLFSCRIPT => 'gs',
HASKELL => 'hs',
MONO => 'cs',
JAVA => 'java',
use constant COMPILER => {
qw/C gcc
CPP g++
+ GOLFSCRIPT golfscript
MONO gmcs
JAVA javac
PASCAL fpc
RUBY ruby
SBCL sbcl/};
+my %needs_fork = map { $_ => 1 } qw/GOLANG GOLFSCRIPT GCCGO JAVA RUBY/;
+
my $loglevel = $ENV{TEST_LOG_LEVEL} // ($ENV{TEST_VERBOSE} ? 'TRACE' : 'OFF');
my $log_conf = <<CONF;
log4perl.category.Gruntmaster.Daemon = $loglevel, stderr
my $format = $meta->{files}{prog}{format};
my $compiler = COMPILER->{$format};
skip "$compiler not found in path", 3 unless $ENV{GRUNTMASTER_VM} || which $compiler;
- skip "$format requires multiple processes. Set GRUNTMASTER_KILL_USER and GRUNTMASTER_SUDO to allow multiple processes.", 3 if !$ENV{GRUNTMASTER_KILL_USER} && ($format eq 'JAVA' || $format eq 'GOLANG' || $format eq 'GCCGO' || $format eq 'RUBY');
+ skip "$format requires multiple processes. Set GRUNTMASTER_KILL_USER and GRUNTMASTER_SUDO to allow multiple processes.", 3 if !$ENV{GRUNTMASTER_KILL_USER} && $needs_fork{$format};
$meta->{files}{prog}{content} = read_file "$source/$meta->{files}{prog}{name}";
}
$meta = merge $meta, $pbmeta;
--- /dev/null
+test_name: GolfScript
+test_description: Hello world in GolfScript
+problem: hello
+files:
+ prog:
+ format: GOLFSCRIPT
+ name: prog.gs
--- /dev/null
+'Hello World!'