Merge branch 'master' of ssh://github.com/engineer-man/piston

This commit is contained in:
Brian Seymour 2021-01-21 19:32:49 -06:00
commit 9237806dee
5 changed files with 14 additions and 9 deletions

View File

@ -1,4 +1,5 @@
#!/bin/bash
cd /tmp/$2
timeout -s KILL 3 python3 -m paradoc code.code < args.args
export PYTHONPATH=$PYTHONPATH:/opt/paradoc
timeout -s KILL 3 python3.8 -m paradoc code.code < args.args

View File

@ -52,4 +52,4 @@ echo 'testing python2'
echo 'testing python3'
../../cli/execute python3 test3.py
echo 'testing paradoc'
../../cli/execute python3 test_paradoc.py
../../cli/execute bash test_paradoc.sh

View File

@ -1,5 +0,0 @@
try:
import paradoc
print('good')
except:
pass

11
lxc/tests/test_paradoc.sh Normal file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
# add paradoc module to python python
export PYTHONPATH=$PYTHONPATH:/opt/paradoc
# file for test code
test_code=/tmp/paradoc.test
# save test code to file
echo -n iP>$test_code
# pass param to paradoc module and have it print it
echo good | python3.8 -m paradoc $test_code
# clean test code
rm -f $test_code

View File

@ -55,8 +55,6 @@ source /opt/.profile
# therefore it cannot be run directly as it requires python3 to be installed
cd /opt && mkdir paradoc && cd paradoc
git clone https://github.com/betaveros/paradoc.git
echo 'export PYTHONPATH=$PYTHONPATH:/opt/paradoc/paradoc' >> /opt/.profile
source /opt/.profile
# install node.js
# final binary: /opt/nodejs/node-v12.16.1-linux-x64/bin/node