From: Marius Gavrilescu Date: Thu, 11 Feb 2016 23:24:26 +0000 (+0000) Subject: Merge branch 'master' into scaleway X-Git-Url: http://git.ieval.ro/?p=gruntmaster-daemon.git;a=commitdiff_plain;h=a3d80639b63f45a4fc89d9a4630ee336afc17e44;hp=b64ba7e2b3b74ff6ee886e1ee3c85f7468758daf Merge branch 'master' into scaleway --- diff --git a/MANIFEST b/MANIFEST index 7b10ffa..cd07003 100644 --- a/MANIFEST +++ b/MANIFEST @@ -128,6 +128,8 @@ t/problems/hello/tests/php/meta.yml t/problems/hello/tests/php/prog.php t/problems/hello/tests/python/meta.yml t/problems/hello/tests/python/prog.py +t/problems/hello/tests/python3/meta.yml +t/problems/hello/tests/python3/prog.py t/problems/hello/tests/ruby/meta.yml t/problems/hello/tests/ruby/prog.rb t/problems/hello/tests/rust/meta.yml diff --git a/gruntmaster-compile b/gruntmaster-compile index adf2149..2538cde 100755 --- a/gruntmaster-compile +++ b/gruntmaster-compile @@ -31,8 +31,8 @@ given ($format){ exec 'ghc', qw/-DONLINE_JUDGE -Wall -O2 -o/, $basename, $name when 'HASKELL'; exec 'rustc', qw/-O -o/, $basename, $name when 'RUST'; exec 'obc', qw/-x -o/, $basename, $name when 'OBERON'; - exec 'ocamlc', qw/-o/, $basename, $name when 'OCAML'; - exec 'dmd', qw/-version=ONLINE_JUDGE -O -release -inline -noboundscheck/, $name when 'D'; + exec 'ocamlopt', qw/-o/, $basename, $name when 'OCAML'; + exec 'gdc', qw/-DONLINE_JUDGE -Wall -O2 -frelease -fno-bounds-check -o/, $basename, $name when 'D'; when ('BRAINFUCK') { system 'bfc', $name and die "bfc failed: errno=$! return=$?"; @@ -41,7 +41,7 @@ given ($format){ exit } - when ([qw/GOLFSCRIPT JULIA PERL PHP PYTHON RUBY SBCL/]){ + when ([qw/GOLFSCRIPT JULIA PERL PHP PYTHON PYTHON3 RUBY SBCL/]){ open IN, '<', $name; open OUT, '>', $basename; print OUT "#!/usr/bin/golfscript\n" if $_ eq 'GOLFSCRIPT'; @@ -49,6 +49,7 @@ given ($format){ print OUT "#!/usr/bin/perl\n" if $_ eq 'PERL'; print OUT "#!/usr/bin/php -d ONLINE_JUDGE=true\n" if $_ eq 'PHP'; print OUT "#!/usr/bin/python2.7\n" if $_ eq 'PYTHON'; + print OUT "#!/usr/bin/python3\n" if $_ eq 'PYTHON3'; print OUT "#!/usr/bin/ruby\n" if $_ eq 'RUBY'; print OUT "#!/usr/bin/sbcl --script\n" if $_ eq 'SBCL'; print OUT while ; diff --git a/lib/Gruntmaster/Daemon.pm b/lib/Gruntmaster/Daemon.pm index ef3aea6..8a270d6 100644 --- a/lib/Gruntmaster/Daemon.pm +++ b/lib/Gruntmaster/Daemon.pm @@ -34,6 +34,7 @@ use constant FORMAT_EXTENSION => { PERL => 'pl', PHP => 'php', PYTHON => 'py', + PYTHON3 => 'py', RUBY => 'rb', RUST => 'rs', SBCL => 'l', diff --git a/t/problems/hello/tests/python3/meta.yml b/t/problems/hello/tests/python3/meta.yml new file mode 100644 index 0000000..bd3603d --- /dev/null +++ b/t/problems/hello/tests/python3/meta.yml @@ -0,0 +1,7 @@ +test_name: Python3 +test_description: Hello world in Python3 +problem: hello +files: + prog: + format: PYTHON3 + name: prog.py diff --git a/t/problems/hello/tests/python3/prog.py b/t/problems/hello/tests/python3/prog.py new file mode 100755 index 0000000..2378708 --- /dev/null +++ b/t/problems/hello/tests/python3/prog.py @@ -0,0 +1,2 @@ +#!/usr/bin/python3 +print('Hello World!')