Skip to content
Permalink
Browse files

run Python tests inside docker

  • Loading branch information
3nids committed Mar 6, 2019
1 parent 17b8405 commit d42ff348909ffbf10fd0ff92653bbce0940064be
@@ -166,3 +166,16 @@ popd > /dev/null # build
popd > /dev/null # /root/QGIS

[ -r /tmp/ctest-important.log ] && cat /tmp/ctest-important.log || true

##############################
# Run Python Tests on QGIS app
##############################
pushd /root/QGIS/tests/src/python
# Passing cases:
[[ $(qgis_testrunner.sh test_testrunner.run_passing) -eq '0' ]] || exit 1
[[ $(qgis_testrunner.sh test_testrunner.run_skipped_and_passing) -eq '0' ]] || exit 1
# Failing cases:
[[ $(qgis_testrunner.sh test_testrunner) -eq '1' ]] || exit 1
[[ $(qgis_testrunner.sh test_testrunner.run_all) -eq '1' ]] || exit 1
[[ $(qgis_testrunner.sh test_testrunner.run_failing) -eq '1' ]] || exit 1
popd

This file was deleted.

@@ -17,20 +17,4 @@
set -e

# running QGIS tests
docker-compose -f ${TRAVIS_BUILD_DIR}/.docker/docker-compose.travis.yml run --rm qgis-deps

# running tests for the python test runner
docker run -d --name qgis-testing-environment -v ${TRAVIS_BUILD_DIR}/tests/src/python:/tests_directory -e DISPLAY=:99 "qgis/qgis:${DOCKER_TAG}"
sleep 10 # Wait for xvfb to finish starting
# Temporary workaround until docker images are built
docker cp ${TRAVIS_BUILD_DIR}/.docker/qgis_resources/test_runner/qgis_testrunner.sh qgis-testing-environment:/usr/bin/qgis_testrunner.sh
# Run tests in the docker
# Passing cases:
TEST_SCRIPT_PATH=${TRAVIS_BUILD_DIR}/.ci/travis/linux/docker_test.sh
[[ $(${TEST_SCRIPT_PATH} test_testrunner.run_passing) -eq '0' ]]
[[ $(${TEST_SCRIPT_PATH} test_testrunner.run_skipped_and_passing) -eq '0' ]]
# Failing cases:
[[ $(${TEST_SCRIPT_PATH} test_testrunner) -eq '1' ]]
[[ $(${TEST_SCRIPT_PATH} test_testrunner.run_all) -eq '1' ]]
[[ $(${TEST_SCRIPT_PATH} test_testrunner.run_failing) -eq '1' ]]

docker-compose -f ${TRAVIS_BUILD_DIR}/.docker/docker-compose.travis.yml run qgis-deps
@@ -33,3 +33,4 @@ services:
- TRAVIS_TIMESTAMP=${TRAVIS_TIMESTAMP}
- QGIS_DISABLE_MESSAGE_HOOKS=1
- QGIS_NO_OVERRIDE_IMPORT=1
- DISPLAY=:99

0 comments on commit d42ff34

Please sign in to comment.
You can’t perform that action at this time.