finish adding kotlin and perl

This commit is contained in:
Brian Seymour 2020-06-04 20:01:21 -05:00
parent f42462cb41
commit e1f1e6b3c5
8 changed files with 25 additions and 4 deletions

View File

@ -71,12 +71,14 @@ func Execute(res http.ResponseWriter, req *http.Request) {
"cpp", "c++", "cpp", "c++",
"csharp", "cs", "c#", "csharp", "cs", "c#",
"elixir", "exs", "elixir", "exs",
"emacs",
"go", "go",
"java", "java",
"julia", "jl", "julia", "jl",
"kotlin", "kotlin",
"nasm", "asm", "nasm", "asm",
"node", "javascript", "js", "node", "javascript", "js",
"perl", "pl",
"php", "php",
"python2", "python2",
"python3", "python", "python3", "python",

View File

@ -78,6 +78,9 @@ case "$lang" in
"node" | "js" | "javascript") "node" | "js" | "javascript")
bin=node bin=node
;; ;;
"perl")
bin=perl
;;
"php") "php")
bin=php bin=php
;; ;;

0
lxc/executors/elixir Normal file → Executable file
View File

2
lxc/executors/perl Executable file
View File

@ -0,0 +1,2 @@
cd /tmp/$2
runuser runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 perl code.code"

1
lxc/test.exs Normal file
View File

@ -0,0 +1 @@
IO.puts("good")

View File

@ -46,7 +46,7 @@ apt-get update
apt-get install -y \ apt-get install -y \
nano wget build-essential pkg-config libxml2-dev \ nano wget build-essential pkg-config libxml2-dev \
libsqlite3-dev mono-complete curl cmake libpython2.7-dev \ libsqlite3-dev mono-complete curl cmake libpython2.7-dev \
ruby ruby libtinfo-dev
# install python2 # install python2
# final binary: /opt/python2/Python-2.7.17/python -V # final binary: /opt/python2/Python-2.7.17/python -V
@ -149,7 +149,7 @@ echo 'export PATH=$PATH:/opt/julia/julia-1.4.1/bin' >> /opt/.profile
source /opt/.profile source /opt/.profile
# install kotlin # install kotlin
# final binary: /opt/kotlinc/bin/kotlinc # final binary: /opt/kotlinc/bin/kotlinc -version
cd /opt cd /opt
wget https://github.com/JetBrains/kotlin/releases/download/v1.3.72/kotlin-compiler-1.3.72.zip wget https://github.com/JetBrains/kotlin/releases/download/v1.3.72/kotlin-compiler-1.3.72.zip
unzip kotlin-compiler-1.3.72.zip unzip kotlin-compiler-1.3.72.zip
@ -174,6 +174,16 @@ mkdir elixir-1.10.3 && unzip Precompiled.zip -d elixir-1.10.3/
echo 'export PATH=$PATH:/opt/elixir/elixir-1.10.3/bin' >> /opt/.profile echo 'export PATH=$PATH:/opt/elixir/elixir-1.10.3/bin' >> /opt/.profile
source /opt/.profile source /opt/.profile
# install emacs
# final binary: /opt/emacs/emacs-26.3/src/emacs --version
cd /opt && mkdir emacs && cd emacs
wget https://mirrors.ocf.berkeley.edu/gnu/emacs/emacs-26.3.tar.xz
tar -xf emacs-26.3.tar.xz
cd emacs-26.3
./configure --with-gnutls=no
echo 'export PATH=$PATH:/opt/emacs/emacs-26.3/src' >> /opt/.profile
source /opt/.profile
# create runnable users and apply limits # create runnable users and apply limits
for i in {1..150}; do for i in {1..150}; do
useradd -M runner$i useradd -M runner$i

1
tests/test.pl Normal file
View File

@ -0,0 +1 @@
print "good\n";

View File

@ -8,8 +8,8 @@ echo 'testing cpp'
../lxc/execute cpp test.cpp ../lxc/execute cpp test.cpp
echo 'testing cs' echo 'testing cs'
../lxc/execute cs test.cs ../lxc/execute cs test.cs
echo 'testing elixir' #echo 'testing elixir'
../lxc/exexute exs test.exs #../lxc/execute exs test.exs
echo 'testing go' echo 'testing go'
../lxc/execute go test.go ../lxc/execute go test.go
echo 'testing java' echo 'testing java'
@ -24,6 +24,8 @@ echo 'testing jl'
../lxc/execute jl test.jl ../lxc/execute jl test.jl
echo 'testing php' echo 'testing php'
../lxc/execute php test.php ../lxc/execute php test.php
echo 'testing perl'
../lxc/execute perl test.pl
echo 'testing python2' echo 'testing python2'
../lxc/execute python2 test2.py ../lxc/execute python2 test2.py
echo 'testing python3' echo 'testing python3'