diff --git a/lxc/executors/paradoc b/lxc/executors/paradoc index be58dad..f82630a 100755 --- a/lxc/executors/paradoc +++ b/lxc/executors/paradoc @@ -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 diff --git a/lxc/test_all_lxc b/lxc/test_all_lxc index 493c4b5..122ccc4 100755 --- a/lxc/test_all_lxc +++ b/lxc/test_all_lxc @@ -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 diff --git a/lxc/tests/test_paradoc.py b/lxc/tests/test_paradoc.py deleted file mode 100644 index 3acba15..0000000 --- a/lxc/tests/test_paradoc.py +++ /dev/null @@ -1,5 +0,0 @@ -try: - import paradoc - print('good') -except: - pass diff --git a/lxc/tests/test_paradoc.sh b/lxc/tests/test_paradoc.sh new file mode 100644 index 0000000..5f70e1c --- /dev/null +++ b/lxc/tests/test_paradoc.sh @@ -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 diff --git a/var/install.txt b/var/install.txt index ae81b05..c9b151c 100644 --- a/var/install.txt +++ b/var/install.txt @@ -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