Open manylon opened 1 week ago
I am using the qgis_testrunner.sh script to run unit tests for a QGIS-Plugin.
The qgis_testrunner.sh was either missing or returning this ERROR: no output from the test runner! (exit code: 0) I followed the documentation from QGIS Docker images
This is a similar issue to #54314
Reproducing the problem: Cleaning cache from docker, just in case:
$ docker builder prune
$ cd QGIS $ docker build -t qgis/qgis:release-3_36 --build-arg DOCKER_TAG=release-3_36 -f .docker/qgis.dockerfile .
Response starts with:
[internal] load .dockerignore => => transferring context: 71B => [internal] load build definition from qgis.dockerfile => => transferring dockerfile: 2.33kB => [internal] load metadata for docker.io/qgis/qgis3-build-deps:latest
Reminder I am using version = release-3_36
I guess it comes from .docker/qgis.dockerfile
ARG DOCKER_DEPS_TAG=latest
Running the container:
$ xhost + 127.0.0.1 $ docker run --rm -it --name qgis36 -v /dir:/tests_directory/plugin_name -e DISPLAY=host.docker.internal:0 qgis/qgis:release-3_36
Check if the build is successful:
$ docker exec -it qgis36 sh -c "cd /QGIS && cat build_exit_value"
Response:
FAILED
Test test_runner.sh:
$ docker exec -it qgis36 sh -c "cd /tests_directory && qgis_testrunner.sh"
qgis_testrunner.sh: not found
In some cases the response was:
ERROR: no output from the test runner! (exit code: 0)
Did the same with the latest version:
$ docker builder prune $ docker build -t qgis/qgis:latest --build-arg DOCKER_TAG=release-3_36 -f .docker/qgis.dockerfile . $ xhost + 127.0.0.1 $ docker run --rm -it --name qgislatest -v /dir:/tests_directory/plugin_name -e DISPLAY=host.docker.internal:0 qgis/qgis:latest
$ docker exec -it qgislatest sh -c "cd /QGIS && cat build_exit_value"
FAILED $ docker exec -it qgislatest sh -c "cd /tests_directory && qgis_testrunner.sh" Response: qgis_testrunner.sh: not found
$ docker exec -it qgislatest sh -c "cd /tests_directory && qgis_testrunner.sh"
Response: qgis_testrunner.sh: not found
The successful solution was without using .docker/qgis.dockerfile:
$ docker builder prune $ docker pull qgis/qgis:release-3_36 $ xhost + 127.0.0.1 $ docker run --rm -it --name qgis36 -v /dir:/tests_directory/plugin_name -e DISPLAY=host.docker.internal:0 qgis/qgis:release-3_36
Check if the build is succesful:
OK
Test qgis_testrunner:
$ docker exec -it qgis36 sh -c "qgis_testrunner.sh"
ValueError: Empty module name Finished running test (codes: IS_DEAD=1 IS_FAILED=0 IS_PASSED=1).
Setup developing plugin:
$ docker exec -it qgis36 sh -c "qgis_setup.sh plugin_name"
Test plugin
$ docker exec -it qgis36 sh -c "cd /tests_directory && qgis_testrunner.sh plugin_name.tests.test_something"
Works
release-3_36 , latest
No response
Is this an issue with https://github.com/qgis/qgis-docker ? If it is, can you move it there?
What is the bug or the crash?
I am using the qgis_testrunner.sh script to run unit tests for a QGIS-Plugin.
The qgis_testrunner.sh was either missing or returning this ERROR: no output from the test runner! (exit code: 0) I followed the documentation from QGIS Docker images
This is a similar issue to #54314
Steps to reproduce the issue
Reproducing the problem: Cleaning cache from docker, just in case:
Response starts with:
Reminder I am using version = release-3_36
I guess it comes from .docker/qgis.dockerfile
Running the container:
Check if the build is successful:
Response:
Test test_runner.sh:
Response:
In some cases the response was:
Did the same with the latest version:
Check if the build is successful:
Response:
The successful solution was without using .docker/qgis.dockerfile:
Check if the build is succesful:
Response:
Test qgis_testrunner:
Response:
Setup developing plugin:
Test plugin
Response:
Versions
release-3_36 , latest
Supported QGIS version
New profile
Additional context
No response