Skip to content
Permalink
Browse files

Merge pull request #42376 from troopa81/fix_oracle_ci

Split CI providers test
  • Loading branch information
3nids committed Mar 26, 2021
2 parents 41fbcbe + b77af95 commit cf1ffdaaa1c7c35ecd5628ce7bf777d4c1cf69ac
@@ -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)
@@ -20,9 +20,6 @@ qgis_openclutilstest
# Relies on a broken/unreliable 3rd party service
qgis_layerdefinition

# Oracle requires the Oracle docker
PyQgsOracleProvider

# MSSQL requires the MSSQL docker
PyQgsProviderConnectionMssql

@@ -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
@@ -84,7 +84,7 @@ echo "::endgroup::"
#######
echo "${bold}Building QGIS...${endbold}"
echo "::group::build"
${CTEST_BUILD_COMMAND}
ctest -V -S /root/QGIS/.ci/config_build.ctest
echo "::endgroup::"

########################
@@ -97,4 +97,3 @@ popd > /dev/null # build
popd > /dev/null # /root/QGIS

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

0 comments on commit cf1ffda

Please sign in to comment.