Skip to content
Permalink
Browse files

Sibling of c928add

  • Loading branch information
m-kuhn committed Mar 3, 2019
1 parent 24d93f5 commit 7c35265dec433036b4819283300af2bada49afa3
Showing 2,412 changed files with 762,872 additions and 561,881 deletions.
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
###########################################################################
# docker_test.sh
#
# Run a particular test on docker testing env and return its exit code
#
# Arguments:
#
# $1: test name in dotted notation
#
# ---------------------
# Date : November 2018
# Copyright : (C) 2018 by Alessandro Pasotti
# Email : elpaso at itopen dot it
###########################################################################
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
###########################################################################

TEST_NAME=$1

docker exec -it qgis-testing-environment sh -c "cd /tests_directory && qgis_testrunner.sh ${TEST_NAME}" &>/dev/null

echo $?
@@ -34,6 +34,21 @@ if [[ ${DOCKER_BUILD_QGIS_IMAGE} =~ true ]]; then
docker push "qgis/qgis:${DOCKER_TAG}"
popd
else
# running tests
# 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' ]]
fi
@@ -49,7 +49,6 @@ RUN apt-get update \
libqt5svg5-dev \
libqt5webkit5-dev \
libqt5xml5 \
libqt5xmlpatterns5-dev \
libqt5serialport5-dev \
libqwt-qt5-dev \
libspatialindex-dev \
@@ -49,7 +49,6 @@ RUN apt-get update \
libqt5svg5-dev \
libqt5webkit5-dev \
libqt5xml5 \
libqt5xmlpatterns5-dev \
libqt5serialport5-dev \
libqwt-qt5-dev \
libspatialindex-dev \
@@ -32,6 +32,7 @@ matrix:
# QGIS TESTS ON BIONIC
##########################################################
- os: linux
name: building and testing on linux
if: type != cron
services: docker
env:
@@ -44,6 +45,7 @@ matrix:
# CODE LAYOUT
##########################################################
- os: linux
name: code layout
if: type != cron
env:
- TRAVIS_CONFIG=code_layout
@@ -93,6 +95,7 @@ matrix:
# BIONIC DOCKER BUILD ON CRON OR TAG
##########################################################
- os: linux
name: bionic docker build
if: repo = qgis/QGIS AND (tag IS PRESENT OR type = cron)
services: docker
env:
@@ -105,6 +108,7 @@ matrix:
# COSMIC DOCKER BUILD ON CRON OR TAG
##########################################################
- os: linux
name: cosmic docker build
if: repo = qgis/QGIS AND (tag IS PRESENT OR type = cron)
services: docker
env:
@@ -11,11 +11,12 @@ CMAKE_POLICY (SET CMP0053 NEW)
#############################################################
# Project and version
SET(CPACK_PACKAGE_VERSION_MAJOR "3")
SET(CPACK_PACKAGE_VERSION_MINOR "4")
SET(CPACK_PACKAGE_VERSION_PATCH "5")
SET(CPACK_PACKAGE_VERSION_MINOR "6")
SET(CPACK_PACKAGE_VERSION_PATCH "0")
SET(COMPLETE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
SET(RELEASE_NAME "Madeira")
SET(RELEASE_NAME "Noosa")
PROJECT(qgis VERSION ${COMPLETE_VERSION})

IF (APPLE)
SET(QGIS_APP_NAME "QGIS")
ELSE (APPLE)
@@ -68,6 +69,20 @@ IF(NOT MSVC)
endif(USE_CCACHE)
endif(NOT MSVC)

IF (IOS)
SET (DEFAULT_FORCE_STATIC_LIBS TRUE)
ELSE (IOS)
SET (DEFAULT_FORCE_STATIC_LIBS FALSE)
ENDIF (IOS)
SET (FORCE_STATIC_LIBS ${DEFAULT_FORCE_STATIC_LIBS} CACHE BOOL "Determines whether libraries should be static only")
MARK_AS_ADVANCED(FORCE_STATIC_LIBS)

IF(FORCE_STATIC_LIBS)
SET(LIBRARY_TYPE STATIC)
ELSE (FORCE_STATIC_LIBS)
SET(LIBRARY_TYPE SHARED)
ENDIF (FORCE_STATIC_LIBS)

# in generated makefiles use relative paths so the project dir is moveable
# Note commented out since it cause problems but it would be nice to resolve these and enable
#
@@ -97,6 +112,8 @@ IF(WITH_CORE)

SET (WITH_GUI TRUE CACHE BOOL "Determines whether QGIS GUI library (and everything built on top of it) should be built")

SET (WITH_ANALYSIS TRUE CACHE BOOL "Determines whether QGIS analysis library should be built")

SET (WITH_DESKTOP TRUE CACHE BOOL "Determines whether QGIS desktop should be built")

SET (WITH_3D FALSE CACHE BOOL "Determines whether QGIS 3D library should be built")
@@ -130,6 +147,10 @@ IF(WITH_CORE)
SET (HAVE_GUI TRUE) # used in qgsconfig.h
ENDIF()

IF ( WITH_DESKTOP AND NOT WITH_ANALYSIS )
MESSAGE(FATAL_ERROR "Desktop cannot be built without analysis")
ENDIF()

# try to configure and build MDAL support
SET (WITH_INTERNAL_MDAL TRUE CACHE BOOL "Determines whether MDAL support should be built")
IF (NOT WITH_INTERNAL_MDAL)
@@ -315,14 +336,16 @@ IF(WITH_CORE)
ENDIF(WITH_QTWEBKIT)
#############################################################
# search for Qt5
IF (WITH_3D)
# for 3D support we strictly require Qt >= 5.9
# (Qt 3D was introduced in 5.7 but it is not stable enough in that branch)
# Qt 5.8 is missing some classes, https://github.com/qgis/QGIS/pull/5203#discussion_r142319862
SET(QT_MIN_VERSION 5.9.0)
ELSE ()
SET(QT_MIN_VERSION 5.4.0)
ENDIF()
SET(QT_MIN_VERSION 5.9.0)

# Use Qt5SerialPort optionally for GPS
SET (WITH_QT5SERIALPORT TRUE CACHE BOOL "Determines whether Qt5SerialPort should be tried for GPS positioning")
IF (WITH_QT5SERIALPORT)
FIND_PACKAGE(Qt5SerialPort REQUIRED)
# following variable is used in qgsconfig.h
SET (HAVE_QT5SERIALPORT TRUE)
ENDIF(WITH_QT5SERIALPORT)

FIND_PACKAGE(Qt5Core QUIET)
FIND_PACKAGE(Qt5Gui REQUIRED)
FIND_PACKAGE(Qt5Widgets REQUIRED)
@@ -331,7 +354,6 @@ IF(WITH_CORE)
FIND_PACKAGE(Qt5Svg REQUIRED)
FIND_PACKAGE(Qt5Concurrent REQUIRED)
FIND_PACKAGE(Qt5PrintSupport REQUIRED)
FIND_PACKAGE(Qt5SerialPort REQUIRED)
FIND_PACKAGE(Qt5Positioning)
IF (WITH_QTWEBKIT)
FIND_PACKAGE(Qt5WebKit REQUIRED)
@@ -359,7 +381,7 @@ IF(WITH_CORE)
IF(${CMAKE_SYSTEM_NAME} MATCHES "Android")
FIND_PACKAGE(Qt5AndroidExtras)
ELSE(${CMAKE_SYSTEM_NAME} MATCHES "Android")
FIND_PACKAGE(QtQmlTools REQUIRED)
FIND_PACKAGE(QtQmlTools)
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Android")

# following variable is used in qgsconfig.h
@@ -458,13 +480,15 @@ IF (PEDANTIC)
ENDIF (NOT USING_NMAKE AND NOT USING_NINJA)

# disable warnings
SET(_warnings "${_warnings} /wd4091 ") # 'typedef': ignored on left of '' when no variable is declared (occurs in MS DbgHelp.h header)
SET(_warnings "${_warnings} /wd4100 ") # unused formal parameters
SET(_warnings "${_warnings} /wd4127 ") # constant conditional expressions (used in Qt template classes)
SET(_warnings "${_warnings} /wd4190 ") # 'identifier' has C-linkage specified, but returns UDT 'identifier2' which is incompatible with C
SET(_warnings "${_warnings} /wd4231 ") # nonstandard extension used : 'identifier' before template explicit instantiation (used in Qt template classes)
SET(_warnings "${_warnings} /wd4244 ") # conversion from '...' to '...' possible loss of data
SET(_warnings "${_warnings} /wd4251 ") # needs to have dll-interface to be used by clients of class (occurs in Qt template classes)
SET(_warnings "${_warnings} /wd4275 ") # non dll-interface class '...' used as base for dll-interface class '...'
SET(_warnings "${_warnings} /wd4290 ") # c++ exception specification ignored except to indicate a function is not __declspec(nothrow) (occurs in sip generated bindings)
SET(_warnings "${_warnings} /wd4456 ") # declaration of '...' hides previous local declaration
SET(_warnings "${_warnings} /wd4457 ") # declaration of '...' hides a function parameter
SET(_warnings "${_warnings} /wd4458 ") # declaration of '...' hides class member

0 comments on commit 7c35265

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