Tests: Added BEREMIZPYTHONPATH to point to Python interpreter to use for tests. wxPython4
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Fri, 18 Feb 2022 15:00:04 +0100
branchwxPython4
changeset 3431 5bcef31e276d
parent 3430 c2171d87b587
child 3432 40b8b2ffb3fd
Tests: Added BEREMIZPYTHONPATH to point to Python interpreter to use for tests.
tests/ide_tests/sikuliberemiz.py
tests/tools/Docker/beremiz-sikuli/Dockerfile
--- a/tests/ide_tests/sikuliberemiz.py	Fri Feb 18 14:56:54 2022 +0100
+++ b/tests/ide_tests/sikuliberemiz.py	Fri Feb 18 15:00:04 2022 +0100
@@ -8,6 +8,7 @@
 
 home = os.environ["HOME"]
 beremiz_path = os.environ["BEREMIZPATH"]
+python_bin = os.environ.get("BEREMIZPYTHONPATH", "/usr/bin/python")
 
 opj = os.path.join
 
@@ -24,7 +25,7 @@
             Sikuli App class instance
     """
 
-    command = ["%s/beremizenv/bin/python"%home, opj(beremiz_path,"Beremiz.py"), "--log=/dev/stdout"]
+    command = [python_bin, opj(beremiz_path,"Beremiz.py"), "--log=/dev/stdout"]
 
     if exemple is not None:
         command.append(opj(beremiz_path,"exemples",exemple))
--- a/tests/tools/Docker/beremiz-sikuli/Dockerfile	Fri Feb 18 14:56:54 2022 +0100
+++ b/tests/tools/Docker/beremiz-sikuli/Dockerfile	Fri Feb 18 15:00:04 2022 +0100
@@ -58,6 +58,9 @@
         twisted nevow autobahn \
         wxPython==4.1.1
 
+# Point to python binary test scripts will use
+ENV BEREMIZPYTHONPATH /home/$UNAME/beremizenv/bin/python
+
 # easy to remember 'do_tests' alias to invoke main makefile
 ARG OWNDIRBASENAME=beremiz
 ENV OWNDIRBASENAME ${OWNDIRBASENAME}