mirror of
https://github.com/engineer-man/piston.git
synced 2025-09-20 19:00:04 +02:00
Merge branch 'master' into master
This commit is contained in:
commit
99038d3e6d
10 changed files with 61 additions and 4 deletions
|
@ -90,12 +90,18 @@ case "$lang" in
|
|||
"nasm64" | "asm64")
|
||||
bin=nasm64
|
||||
;;
|
||||
"nim")
|
||||
bin=nim
|
||||
;;
|
||||
"node" | "js" | "javascript")
|
||||
bin=node
|
||||
;;
|
||||
"deno" | "denojs" | "denots")
|
||||
bin=deno
|
||||
;;
|
||||
"paradoc")
|
||||
bin=paradoc
|
||||
;;
|
||||
"perl")
|
||||
bin=perl
|
||||
;;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
cd /tmp/$2
|
||||
cp code.code interim.java
|
||||
name=$(cat interim.java | grep -Eo 'public\s+class\s+([A-Za-z0-9]+)' | sed -n 's/ */ /gp' | cut -d' ' -f3)
|
||||
name=$(grep -Po "(?<=\n|\A)\s*(public\s+)?(class|interface)\s+\K([^\n\s{]+)" interim.java)
|
||||
mv interim.java $name.java
|
||||
timeout -s KILL 10 javac $name.java
|
||||
runuser runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 java $name"
|
||||
|
|
4
lxc/executors/nim
Executable file
4
lxc/executors/nim
Executable file
|
@ -0,0 +1,4 @@
|
|||
cd /tmp/$2
|
||||
timeout -s KILL 10 nim --hints:off c code.code
|
||||
runuser runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 ./code"
|
||||
|
2
lxc/executors/paradoc
Executable file
2
lxc/executors/paradoc
Executable file
|
@ -0,0 +1,2 @@
|
|||
cd /tmp/$2
|
||||
runuser runner$1 -c "cd /tmp/$2 ; timeout -s KILL 3 python3 -m paradoc code.code <<< args.args"
|
|
@ -31,6 +31,8 @@ echo 'testing asm 32 bit'
|
|||
../execute asm test.nasm
|
||||
echo 'testing asm 64 bit'
|
||||
../execute asm64 test64.nasm
|
||||
echo 'testing nim'
|
||||
../execute nim test.nim
|
||||
echo 'testing php'
|
||||
../execute php test.php
|
||||
echo 'testing perl'
|
||||
|
@ -51,3 +53,5 @@ echo 'testing python3'
|
|||
../execute python3 test3.py
|
||||
echo 'testing common lisp'
|
||||
../execute sbcl --script test.cl
|
||||
echo 'testing paradoc'
|
||||
../execute python3 test_paradoc.py
|
1
lxc/tests/test.nim
Normal file
1
lxc/tests/test.nim
Normal file
|
@ -0,0 +1 @@
|
|||
echo("good")
|
5
lxc/tests/test_paradoc.py
Normal file
5
lxc/tests/test_paradoc.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
try:
|
||||
import paradoc
|
||||
print('good')
|
||||
except:
|
||||
pass
|
12
lxc/versions
12
lxc/versions
|
@ -9,6 +9,10 @@ echo 'bash'
|
|||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "bash --version"
|
||||
echo '---'
|
||||
|
||||
echo 'brainfuck'
|
||||
echo '1.0.0'
|
||||
echo '---'
|
||||
|
||||
echo 'c'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "gcc -v"
|
||||
echo '---'
|
||||
|
@ -65,6 +69,10 @@ echo 'nasm'
|
|||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "nasm -version"
|
||||
echo '---'
|
||||
|
||||
echo 'nim'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "nim -v | head -n1"
|
||||
echo '---'
|
||||
|
||||
echo 'node'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "node --version"
|
||||
echo '---'
|
||||
|
@ -85,6 +93,10 @@ echo 'python3'
|
|||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "python3 -V"
|
||||
echo '---'
|
||||
|
||||
echo 'paradoc'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "python3 -m paradoc --version"
|
||||
echo '---'
|
||||
|
||||
echo 'ruby'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "ruby --version"
|
||||
echo '---'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue