Skip to content
Permalink
Browse files

Run providers tests in different CI jobs

  • Loading branch information
troopa81 committed Mar 23, 2021
1 parent a6644f4 commit 1821d7af478e41e145b8744ca33efbe2e634c621
@@ -46,54 +46,10 @@ IF(NOT WIN32)
SET(BoldWhite "${Esc}[1;37m")
ENDIF(NOT WIN32)

# Requires a track on the CDash server
#ctest_start(Experimental TRACK Travis)
ctest_start(Experimental)
ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE BUILDRES NUMBER_WARNINGS NUMWARN NUMBER_ERRORS NUMERR)

# Create link to test results
# CDash on OTB requires the date to be set for the search to work (used to be UTC-6, seems to be UTC now)
SET(ENV{TZ} "UTC")
EXECUTE_PROCESS(COMMAND date +%Y-%m-%d OUTPUT_VARIABLE CDASH_DATE)
SET(RESULT_LINK "http://cdash.orfeo-toolbox.org/index.php?project=QGIS&filtercount=1&showfilters=1&field1=buildname/string&compare1=63&value1=$ENV{CTEST_BUILD_NAME}&date=${CDASH_DATE}")
EXECUTE_PROCESS(COMMAND curl --data-urlencode "url=${RESULT_LINK}" -s http://tinyurl.com/api-create.php
OUTPUT_VARIABLE SHORTURL)

SET(IGNORE_BUILD_FAILURES $ENV{IGNORE_BUILD_FAILURES})
IF(NOT IGNORE_BUILD_FAILURES)
IF(NOT ${BUILDRES} EQUAL 0 OR NOT ${NUMERR} EQUAL 0)
ctest_submit (RETRY_COUNT 3 RETRY_DELAY 30)
MESSAGE("")
MESSAGE(" ${Yellow}Test results submitted to:${ColorReset} ${SHORTURL}")
MESSAGE("")
MESSAGE( FATAL_ERROR " ${Red}Build failed. Not running tests.${ColorReset}" )
MESSAGE("")
ENDIF(NOT ${BUILDRES} EQUAL 0 OR NOT ${NUMERR} EQUAL 0)
ENDIF(NOT IGNORE_BUILD_FAILURES)
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL ${PARALLEL_LEVEL} RETURN_VALUE TESTRES)
IF(NOT ${NUMWARN} EQUAL 0 OR NOT ${TESTRES} EQUAL 0)
ctest_submit (RETRY_COUNT 3 RETRY_DELAY 30)
MESSAGE("")
MESSAGE(" ${Yellow}Test results submitted to:${ColorReset} ${SHORTURL}" )
MESSAGE("")
SET(LEVEL "")
IF(NOT ${TESTRES} EQUAL 0)
SET(TESTRES_MESSAGE " Tests failed.")
SET(LEVEL FATAL_ERROR)
ENDIF(NOT ${TESTRES} EQUAL 0)
IF(NOT ${NUMWARN} EQUAL 0)
SET(WARNING_MESSAGE " Build warnings found.")
IF(NOT IGNORE_BUILD_FAILURES)
SET(LEVEL FATAL_ERROR)
ENDIF(NOT IGNORE_BUILD_FAILURES)
ENDIF(NOT ${NUMWARN} EQUAL 0)
MESSAGE( ${LEVEL} " ${Red}${TESTRES_MESSAGE} ${WARNING_MESSAGE}${ColorReset}" )
ENDIF(NOT ${NUMWARN} EQUAL 0 OR NOT ${TESTRES} EQUAL 0)

IF(NOT ${TESTRES} EQUAL 0)
MESSAGE("")
MESSAGE(" ${BoldGreen}Success${ColorReset}")
MESSAGE(" ${Green}All tests passed successfully.${ColorReset}")
MESSAGE("")
MESSAGE("")
ENDIF(NOT ${TESTRES} EQUAL 0)
@@ -0,0 +1,27 @@
include(${CMAKE_CURRENT_LIST_DIR}/config.ctest)

# Requires a track on the CDash server
ctest_start(Experimental)

ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE BUILDRES NUMBER_WARNINGS NUMWARN NUMBER_ERRORS NUMERR)


SET(IGNORE_BUILD_FAILURES $ENV{IGNORE_BUILD_FAILURES})
IF(NOT IGNORE_BUILD_FAILURES)
IF(NOT ${BUILDRES} EQUAL 0 OR NOT ${NUMERR} EQUAL 0)
ctest_submit (RETRY_COUNT 3 RETRY_DELAY 30)
MESSAGE("")
MESSAGE(" ${Yellow}Test results submitted to:${ColorReset} ${SHORTURL}")
MESSAGE("")
MESSAGE( FATAL_ERROR " ${Red}Build failed. Not running tests.${ColorReset}" )
MESSAGE("")
ENDIF(NOT ${BUILDRES} EQUAL 0 OR NOT ${NUMERR} EQUAL 0)
ENDIF(NOT IGNORE_BUILD_FAILURES)

IF(${BUILDRES} EQUAL 0 OR ${NUMERR} EQUAL 0)
MESSAGE("")
MESSAGE(" ${BoldGreen}Success${ColorReset}")
MESSAGE(" ${Green}Build passed successfully.${ColorReset}")
MESSAGE("")
MESSAGE("")
ENDIF(${BUILDRES} EQUAL 0 OR ${NUMERR} EQUAL 0)
@@ -0,0 +1,26 @@
include(${CMAKE_CURRENT_LIST_DIR}/config.ctest)

# Requires a track on the CDash server
ctest_start(Experimental)

ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL ${PARALLEL_LEVEL} RETURN_VALUE TESTRES)
IF(NOT ${TESTRES} EQUAL 0)
ctest_submit (RETRY_COUNT 3 RETRY_DELAY 30)
MESSAGE("")
MESSAGE(" ${Yellow}Test results submitted to:${ColorReset} ${SHORTURL}" )
MESSAGE("")
SET(LEVEL "")
IF(NOT ${TESTRES} EQUAL 0)
SET(TESTRES_MESSAGE " Tests failed.")
SET(LEVEL FATAL_ERROR)
ENDIF(NOT ${TESTRES} EQUAL 0)
MESSAGE( ${LEVEL} " ${Red}${TESTRES_MESSAGE} ${ColorReset}" )
ENDIF(NOT ${TESTRES} EQUAL 0)

IF(NOT ${TESTRES} EQUAL 0)
MESSAGE("")
MESSAGE(" ${BoldGreen}Success${ColorReset}")
MESSAGE(" ${Green}All tests passed successfully.${ColorReset}")
MESSAGE("")
MESSAGE("")
ENDIF(NOT ${TESTRES} EQUAL 0)
@@ -0,0 +1,22 @@
version: '3'
services:

oracle:
image: oslandia/oracle-slim-for-qgis:18.4.0-xe
environment:
- ORACLE_SID=XE
- ORACLE_PWD=adminpass
- ORACLE_PDB=ORCLPDBTEST
- ORACLE_CHARACTERSET=AL32UTF8
ports:
- 1521:1521

qgis-deps:
tty: true
image: qgis/qgis3-build-deps-bin-only:${DOCKER_TAG}
volumes:
- ${GH_WORKSPACE}:/root/QGIS
links:
- oracle
env_file:
- docker-variables.env
@@ -0,0 +1,22 @@
version: '3'
services:
postgres:
build:
dockerfile: Dockerfile-postgis
context: ../tests/testdata
environment:
- ALLOW_IP_RANGE="172.18.0.0/16"
# The following files are added in Dockerfile-postgis
- SSL_CERT_FILE=/etc/ssl/certs/postgres.crt
- SSL_KEY_FILE=/etc/ssl/private/postgres.key
- SSL_CA_FILE=/etc/ssl/certs/qgis_ca.crt

qgis-deps:
tty: true
image: qgis/qgis3-build-deps-bin-only:${DOCKER_TAG}
volumes:
- ${GH_WORKSPACE}:/root/QGIS
links:
- postgres
env_file:
- docker-variables.env
@@ -1,26 +1,5 @@
version: '3'
services:
postgres:
build:
dockerfile: Dockerfile-postgis
context: ../tests/testdata
environment:
- ALLOW_IP_RANGE="172.18.0.0/16"
# The following files are added in Dockerfile-postgis
- SSL_CERT_FILE=/etc/ssl/certs/postgres.crt
- SSL_KEY_FILE=/etc/ssl/private/postgres.key
- SSL_CA_FILE=/etc/ssl/certs/qgis_ca.crt

# oracle:
# image: oslandia/oracle-for-qgis-tests-configured:18.4.0-xe
# environment:
# - ORACLE_SID=XE
# - ORACLE_PWD=adminpass
# - ORACLE_PDB=ORCLPDBTEST
# - ORACLE_CHARACTERSET=AL32UTF8
# ports:
# - 1521:1521


# Proving very fragile!
# mssql:
@@ -31,12 +10,10 @@ services:

qgis-deps:
tty: true
image: qgis_image
image: qgis/qgis3-build-deps-bin-only:${DOCKER_TAG}
volumes:
- ${GH_WORKSPACE}:/root/QGIS
links:
- postgres
# - oracle
# links:
# - mssql
env_file:
- docker-variables.env

0 comments on commit 1821d7a

Please sign in to comment.