From 402ec32f8b85dd7eb17d0e9918c77cd90566d446 Mon Sep 17 00:00:00 2001 From: Pyroseza Date: Thu, 21 Jan 2021 21:48:06 +0000 Subject: [PATCH 1/7] Updated python3 commands to use 3.8 --- lxc/test_all_lxc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lxc/test_all_lxc b/lxc/test_all_lxc index 493c4b5..cff05a1 100755 --- a/lxc/test_all_lxc +++ b/lxc/test_all_lxc @@ -50,6 +50,6 @@ echo 'testing typescript' echo 'testing python2' ../../cli/execute python2 test2.py echo 'testing python3' -../../cli/execute python3 test3.py +../../cli/execute python3.8 test3.py echo 'testing paradoc' -../../cli/execute python3 test_paradoc.py +../../cli/execute python3.8 test_paradoc.py From 6c1e4082e0a32c14ed2bd95bf24edb3bb7281f3a Mon Sep 17 00:00:00 2001 From: Pyroseza Date: Thu, 21 Jan 2021 21:49:17 +0000 Subject: [PATCH 2/7] Updated paradoc executor to use python3.8 --- lxc/executors/paradoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lxc/executors/paradoc b/lxc/executors/paradoc index be58dad..50aab63 100755 --- a/lxc/executors/paradoc +++ b/lxc/executors/paradoc @@ -1,4 +1,4 @@ #!/bin/bash cd /tmp/$2 -timeout -s KILL 3 python3 -m paradoc code.code < args.args +timeout -s KILL 3 python3.8 -m paradoc code.code < args.args From 3fc860788be10060bd2d1dc5f1858ce7d4301513 Mon Sep 17 00:00:00 2001 From: Pyroseza Date: Thu, 21 Jan 2021 21:51:26 +0000 Subject: [PATCH 3/7] Moved paradoc path to executor --- lxc/executors/paradoc | 1 + 1 file changed, 1 insertion(+) diff --git a/lxc/executors/paradoc b/lxc/executors/paradoc index 50aab63..f82630a 100755 --- a/lxc/executors/paradoc +++ b/lxc/executors/paradoc @@ -1,4 +1,5 @@ #!/bin/bash cd /tmp/$2 +export PYTHONPATH=$PYTHONPATH:/opt/paradoc timeout -s KILL 3 python3.8 -m paradoc code.code < args.args From 4a160ac5abd75e6fbce0df155e42f9e897ff08f6 Mon Sep 17 00:00:00 2001 From: Pyroseza Date: Thu, 21 Jan 2021 21:53:17 +0000 Subject: [PATCH 4/7] Convert paradoc test execution to call bash script --- lxc/test_all_lxc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lxc/test_all_lxc b/lxc/test_all_lxc index cff05a1..c9de1b7 100755 --- a/lxc/test_all_lxc +++ b/lxc/test_all_lxc @@ -52,4 +52,4 @@ echo 'testing python2' echo 'testing python3' ../../cli/execute python3.8 test3.py echo 'testing paradoc' -../../cli/execute python3.8 test_paradoc.py +../../cli/execute bash test_paradoc.sh From 7ab437399276327ddb0babd8375177d98828c28b Mon Sep 17 00:00:00 2001 From: Pyroseza Date: Thu, 21 Jan 2021 22:05:28 +0000 Subject: [PATCH 5/7] Convert paradoc test to bash script Now loads the paradoc correctly and gets paradoc to print the result --- lxc/tests/test_paradoc.py | 5 ----- lxc/tests/test_paradoc.sh | 11 +++++++++++ 2 files changed, 11 insertions(+), 5 deletions(-) delete mode 100644 lxc/tests/test_paradoc.py create mode 100644 lxc/tests/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 From ef549ff0c235923ae39d341c411087d76523b427 Mon Sep 17 00:00:00 2001 From: Pyroseza Date: Thu, 21 Jan 2021 22:12:23 +0000 Subject: [PATCH 6/7] Removed paradoc from pythonpath This supposedly conflicts with other executors so I have moved it to the individual executor and test in previous commits --- var/install.txt | 2 -- 1 file changed, 2 deletions(-) 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 From b72c429c42520949d8d7ea724ef0bd55ee17d440 Mon Sep 17 00:00:00 2001 From: Pyroseza Date: Fri, 22 Jan 2021 01:19:21 +0000 Subject: [PATCH 7/7] =?UTF-8?q?=E2=94=AC=E2=94=80=E2=94=AC=20=E3=83=8E(=20?= =?UTF-8?q?=E3=82=9C-=E3=82=9C=E3=83=8E)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lxc/test_all_lxc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lxc/test_all_lxc b/lxc/test_all_lxc index c9de1b7..122ccc4 100755 --- a/lxc/test_all_lxc +++ b/lxc/test_all_lxc @@ -50,6 +50,6 @@ echo 'testing typescript' echo 'testing python2' ../../cli/execute python2 test2.py echo 'testing python3' -../../cli/execute python3.8 test3.py +../../cli/execute python3 test3.py echo 'testing paradoc' ../../cli/execute bash test_paradoc.sh