added a version of piston which uses lxc instead of docker, added tests for lxc

This commit is contained in:
Brian Seymour 2018-10-22 16:38:52 -05:00
parent 748f438718
commit b26d1b5b45
30 changed files with 233 additions and 0 deletions

6
lxc/executors/java Executable file
View file

@ -0,0 +1,6 @@
cd /tmp/$1
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)
mv interim.java $name.java
timeout -s KILL 10 javac $name.java
timeout -s KILL 3 bash -c "cat args.args | xargs -d '\n' java $name"