Skip to content
Permalink
Browse files

[CTest] Enable individual tests depending on appropriate cmake options

  • Loading branch information
m-kuhn committed Jun 25, 2015
1 parent 113efca commit 7ce4edf13e49b6c4e5c624c7180bbfa6f0cea581
Showing with 22 additions and 8 deletions.
  1. +4 −1 i18n/CMakeLists.txt
  2. +3 −1 tests/src/CMakeLists.txt
  3. +15 −6 tests/src/python/CMakeLists.txt
@@ -32,7 +32,10 @@ ADD_CUSTOM_TARGET (translations ALL
DEPENDS ${QM_FILES})

# first compile sources, then compile translations
ADD_DEPENDENCIES (translations ${QGIS_APP_NAME})
IF (WITH_DESKTOP)
ADD_DEPENDENCIES (translations ${QGIS_APP_NAME})
ENDIF (WITH_DESKTOP)


INSTALL (FILES ${QM_FILES}
DESTINATION ${QGIS_DATA_DIR}/i18n)
@@ -3,7 +3,9 @@ IF (ENABLE_TESTS)
ADD_SUBDIRECTORY(gui)
ADD_SUBDIRECTORY(analysis)
ADD_SUBDIRECTORY(providers)
ADD_SUBDIRECTORY(app)
IF (WITH_DESKTOP)
ADD_SUBDIRECTORY(app)
ENDIF (WITH_DESKTOP)
IF (WITH_BINDINGS)
ADD_SUBDIRECTORY(python)
ENDIF (WITH_BINDINGS)
@@ -2,7 +2,6 @@ SET (ENABLE_PGTEST FALSE CACHE BOOL "Enable PostgreSQL provider tests")

INCLUDE(UsePythonTest)
ADD_PYTHON_TEST(PyQgsApplication test_qgsapplication.py)
ADD_PYTHON_TEST(PyQgsLocalServer test_qgis_local_server.py)
ADD_PYTHON_TEST(PyQgsFontUtils test_qgsfontutils.py)
ADD_PYTHON_TEST(PyQgsFeature test_qgsfeature.py)
ADD_PYTHON_TEST(PyQgsFeatureIterator test_qgsfeatureiterator.py)
@@ -35,22 +34,32 @@ ADD_PYTHON_TEST(PyQgsExpression test_qgsexpression.py)
ADD_PYTHON_TEST(PyQgsPalLabelingBase test_qgspallabeling_base.py)
ADD_PYTHON_TEST(PyQgsPalLabelingCanvas test_qgspallabeling_canvas.py)
ADD_PYTHON_TEST(PyQgsPalLabelingComposer test_qgspallabeling_composer.py)
ADD_PYTHON_TEST(PyQgsPalLabelingServer test_qgspallabeling_server.py)
ADD_PYTHON_TEST(PyQgsVectorFileWriter test_qgsvectorfilewriter.py)
ADD_PYTHON_TEST(PyQgsZonalStatistics test_qgszonalstatistics.py)
ADD_PYTHON_TEST(PyQgsAppStartup test_qgsappstartup.py)
ADD_PYTHON_TEST(PyQgsDistanceArea test_qgsdistancearea.py)
ADD_PYTHON_TEST(PyQgsGraduatedSymbolRendererV2 test_qgsgraduatedsymbolrendererv2.py)
ADD_PYTHON_TEST(PyQgsNetworkContentFetcher test_qgsnetworkcontentfetcher.py)
ADD_PYTHON_TEST(PyQgsEditWidgets test_qgseditwidgets.py)
ADD_PYTHON_TEST(PyQgsRangeWidgets test_qgsrangewidgets.py)
ADD_PYTHON_TEST(PyQgsAttributeTableModel test_qgsattributetablemodel.py)
IF (ENABLE_PGTEST)
ADD_PYTHON_TEST(PyQgsPostgresProvider test_provider_postgres.py)
ENDIF (ENABLE_PGTEST)
ADD_PYTHON_TEST(PyQgsSpatialiteProvider test_provider_spatialite.py)
ADD_PYTHON_TEST(PyQgsShapefileProvider test_provider_shapefile.py)
ADD_PYTHON_TEST(PyQgsMemoryProvider test_provider_memory.py)

# Add optional tests which depend on certain cmake options
IF (WITH_SERVER)
ADD_PYTHON_TEST(PyQgsPalLabelingServer test_qgspallabeling_server.py)
ADD_PYTHON_TEST(PyQgsLocalServer test_qgis_local_server.py)
ENDIF (WITH_SERVER)

IF (WITH_DESKTOP)
ADD_PYTHON_TEST(PyQgsAppStartup test_qgsappstartup.py)
ENDIF (WITH_DESKTOP)

IF (ENABLE_PGTEST)
ADD_PYTHON_TEST(PyQgsPostgresProvider test_provider_postgres.py)
ENDIF (ENABLE_PGTEST)

IF (WITH_APIDOC)
ADD_PYTHON_TEST(PyQgsDocCoverage test_qgsdoccoverage.py)
ENDIF (WITH_APIDOC)

0 comments on commit 7ce4edf

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