# HG changeset patch # User Edouard Tisserant # Date 1671112530 -3600 # Node ID cd477457d825286976de414d5dedd20c27260a34 # Parent a538a163ff6f673b4a93aef752b548515c43d449# Parent 302492568cf4a8b466edb150442f3e8f5b6eca4a Merge diff -r 302492568cf4 -r cd477457d825 tests/ide_tests/new_project.sikuli/new_project.py --- a/tests/ide_tests/new_project.sikuli/new_project.py Thu Dec 15 14:54:05 2022 +0100 +++ b/tests/ide_tests/new_project.sikuli/new_project.py Thu Dec 15 14:55:30 2022 +0100 @@ -28,11 +28,15 @@ # Move to "Home" section of file selecor, otherwise address is # "file ignored" at first run app.type("f", Key.CTRL) + app.WaitIdleUI() app.type(Key.ESC) + app.WaitIdleUI() app.type(Key.TAB) + app.WaitIdleUI() # Enter directory by name app.k.Address() + app.WaitIdleUI() # Fill address bar app.type(new_project_path + Key.ENTER) diff -r 302492568cf4 -r cd477457d825 tests/ide_tests/sikuliberemiz.py --- a/tests/ide_tests/sikuliberemiz.py Thu Dec 15 14:54:05 2022 +0100 +++ b/tests/ide_tests/sikuliberemiz.py Thu Dec 15 14:55:30 2022 +0100 @@ -12,9 +12,9 @@ beremiz_path = os.environ["BEREMIZPATH"] python_bin = os.environ.get("BEREMIZPYTHONPATH", "/usr/bin/python") - opj = os.path.join +tessdata_path = os.environ["TESSDATAPATH"] class KBDShortcut: """Send shortut to app by calling corresponding methods. @@ -199,6 +199,7 @@ Returns: Sikuli App class instance """ + sikuli.OCR.Options().dataPath(tessdata_path) sikuli.OCR.Options().oem(0) self.screenshotnum = 0 diff -r 302492568cf4 -r cd477457d825 tests/tools/Docker/Dockerfile --- a/tests/tools/Docker/Dockerfile Thu Dec 15 14:54:05 2022 +0100 +++ b/tests/tools/Docker/Dockerfile Thu Dec 15 14:55:30 2022 +0100 @@ -54,6 +54,7 @@ ) | install /dev/stdin /usr/local/bin/sikulix +# easy to remember 'do_tests' alias to invoke main makefile RUN env echo -e '#!/bin/bash\nmake -f /home/testing/src/beremiz/tests/Makefile $*' > /usr/local/bin/do_tests RUN chmod +x /usr/local/bin/do_tests @@ -69,11 +70,16 @@ twisted nevow autobahn click opcua \ wxPython==4.1.1 -# Point to python binary test scripts will use +RUN set -xe && \ + cd /home/$UNAME && mkdir tessdata && \ + wget -q https://github.com/tesseract-ocr/tessdata/archive/refs/tags/4.1.0.tar.gz \ + -O tessdata.tar.gz && \ + echo 89e25c7c40a59be7195422a01f57fcb2 tessdata.tar.gz | md5sum -c && \ + tar --strip-components=1 -C tessdata -x -v -z -f tessdata.tar.gz && \ + rm tessdata.tar.gz + +ENV TESSDATAPATH /home/$UNAME/tessdata + +# Points to python binary that test 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} - -