Skip to content
Permalink
Browse files

yeah

  • Loading branch information
3nids committed Mar 7, 2019
1 parent 5e0a700 commit ff6aa91ffcf7450f1745d8e5d6a116dbb139863e
@@ -16,17 +16,28 @@

set -e

docker run -t --name qgis_container -v ${TRAVIS_BUILD_DIR}:/root/QGIS -v ${CCACHE_DIR}:/root/.ccache qgis/qgis3-build-deps:${DOCKER_TAG} /root/QGIS/.ci/travis/linux/scripts/docker-qgis-build.sh
# build QGIS in docker
docker run -t --name qgis_container \
-v ${TRAVIS_BUILD_DIR}:/root/QGIS \
-v ${CCACHE_DIR}:/root/.ccache qgis/qgis3-build-deps:${DOCKER_TAG} \
-e TRAVIS_UPLOAD_TIME=${TRAVIS_UPLOAD_TIME} \
-e TRAVIS_BRANCH=${TRAVIS_BRANCH} \
-e TRAVIS_OS_NAME=${TRAVIS_OS_NAME} \
-e TRAVIS_CONFIG=${TRAVIS_CONFIG} \
-e TRAVIS=${TRAVIS} \
-e QGIS_NO_OVERRIDE_IMPORT=1 \
/root/QGIS/.ci/travis/linux/scripts/docker-qgis-build.sh

# commit container
docker commit qgis_container qgis_image

# running QGIS tests
# running QGIS tests in commited image
docker-compose -f ${TRAVIS_BUILD_DIR}/.docker/docker-compose.travis.yml run qgis-deps /root/QGIS/.ci/travis/linux/scripts/docker-qgis-test.sh

# 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_image "/usr/bin/supervisord -c /etc/supervisor/supervisord.conf"
sleep 10 # Wait for xvfb to finish starting


declare -A testrunners
# Passing cases:
testrunners["test_testrunner.run_passing"]=0
@@ -19,6 +19,7 @@ export LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
export SEGFAULT_SIGNALS="abrt segv"
export CTEST_BUILD_COMMAND="/usr/bin/ninja"
export CTEST_PARALLEL_LEVEL=1
export CTEST_BUILD_DIR=/root/QGIS

##############################
# Variables for output styling
@@ -77,7 +78,7 @@ echo "travis_fold:end:cmake"
# Hopefully clocks are in sync :)

CURRENT_TIME=$(date +%s)
TIMEOUT=$((( TRAVIS_AVAILABLE_TIME - UPLOAD_TIME ) * 60 - CURRENT_TIME + TRAVIS_AVAILABLE_TIMESTAMP))
TIMEOUT=$((( TRAVIS_AVAILABLE_TIME - TRAVIS_UPLOAD_TIME ) * 60 - CURRENT_TIME + TRAVIS_AVAILABLE_TIMESTAMP))
TIMEOUT=$(( TIMEOUT < 300 ? 300 : TIMEOUT ))
echo "Timeout: ${TIMEOUT}s (started at ${TRAVIS_AVAILABLE_TIMESTAMP}, current: ${CURRENT_TIME})"

@@ -69,7 +69,7 @@ EOT
# Run tests
###########
CURRENT_TIME=$(date +%s)
TIMEOUT=$((( TRAVIS_AVAILABLE_TIME - UPLOAD_TIME) * 60 - CURRENT_TIME + TRAVIS_AVAILABLE_TIMESTAMP))
TIMEOUT=$((( TRAVIS_AVAILABLE_TIME - TRAVIS_UPLOAD_TIME) * 60 - CURRENT_TIME + TRAVIS_AVAILABLE_TIMESTAMP))
echo "Timeout: ${TIMEOUT}s (started at ${TRAVIS_AVAILABLE_TIMESTAMP}, current: ${CURRENT_TIME})"
timeout ${TIMEOUT}s python3 /root/QGIS/.ci/travis/scripts/ctest2travis.py xvfb-run ctest -V -E "$(cat /root/QGIS/.ci/travis/linux/blacklist.txt | sed -r '/^(#.*?)?$/d' | paste -sd '|' -)" -S /root/QGIS/.ci/travis/travis.ctest --output-on-failure
rv=$?
@@ -20,16 +20,9 @@ services:
- postgres
- mssql
environment:
- CCACHE_DIR=/root/.ccache
- CTEST_BUILD_DIR=/root/QGIS
- TRAVIS_UPLOAD_TIME=${TRAVIS_UPLOAD_TIME}
- TRAVIS_BRANCH=${TRAVIS_BRANCH}
- TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST}
- TRAVIS_PULL_REQUEST_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH}
- TRAVIS_COMMIT_RANGE=${TRAVIS_COMMIT_RANGE}
- TRAVIS_OS_NAME=${TRAVIS_OS_NAME}
- TRAVIS_CONFIG=${TRAVIS_CONFIG}
- TRAVIS=${TRAVIS}
- TRAVIS_TIMESTAMP=${TRAVIS_TIMESTAMP}
- QGIS_DISABLE_MESSAGE_HOOKS=1
- QGIS_NO_OVERRIDE_IMPORT=1
- DISPLAY=:99
@@ -17,7 +17,7 @@ env:
global:
- TRAVIS_TIMESTAMP=$(date +%s)
- TRAVIS_AVAILABLE_TIME=150 # in minutes
- UPLOAD_TIME=5 # time considered to start the machine and the container (minutes)
- TRAVIS_UPLOAD_TIME=5 # time considered to start the machine and the container (minutes)
# Docker hub username and passowrd
- secure: "b7eMDIolaAnq1voGKC1ez7Kcf+/A0WZDJEHBvNwk2KubBfrGOE83GMDrFNF4NqjIprqIAvVKj+TrX1ckCvs24re3IqUJo71TaF1IgxzDDPwSsmNh5UMmvZkeiJys9bWjqDO9wYR5ietNmIE18qyMc8ToJk8oKm6AXuAG2n6znmM="
- secure: "PHCp7F3nApp38Mz6b4/OLxgfBiikRGzPQDHg3R5LX+SQOll24c/DMtwpPwizNuFEiCFcRmJ9uc1t0HWEerIZe5uqm7AtE/nMXBsvDZ+hj4Tz/fEBF98a1k4WLYheN1exFidVkJgdAeiwMOOUQXw5KuIX62bxBdzsdcd0QGwxiXo="

0 comments on commit ff6aa91

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