Skip to content
Permalink
Browse files

Fix Mac path to resources and grass and sqlanywhere provider framewor…

…ks for tests

- Any test needing access to QGIS_DATA_SUBDIR (srs.db, svg, etc.) was looking for Resources in the bundled app instead
- This included failure for any call to qgscoordinatereferencesystem.cpp using srs.db and when locating svg icons
- Does not fix QGIS_DATA_SUBDIR in Python tests
- Subtests that were failing, as above, within a given test are still not triggering a fail for the test
- Symlink to grass and sqlanywhere frameworks created just for testing
  • Loading branch information
dakcarto committed Aug 17, 2012
1 parent 5a0fd29 commit 07e3c16c634866eb8186cc156f74771cf057fe86
Showing with 10 additions and 0 deletions.
  1. +6 −0 CMakeLists.txt
  2. +4 −0 tests/CMakeLists.txt
@@ -466,6 +466,12 @@ IF (APPLE AND ENABLE_TESTS)
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink
"${CMAKE_CURRENT_BINARY_DIR}/Plugins"
"${CMAKE_CURRENT_BINARY_DIR}/output/Plugins")
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink
"${CMAKE_CURRENT_BINARY_DIR}/Plugins/qgis/qgisgrass.framework"
"${CMAKE_CURRENT_BINARY_DIR}/output/lib/qgisgrass.framework")
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink
"${CMAKE_CURRENT_BINARY_DIR}/Plugins/qgis/qgissqlanyconnection.framework"
"${CMAKE_CURRENT_BINARY_DIR}/output/lib/qgissqlanyconnection.framework")
ENDIF (APPLE AND ENABLE_TESTS)

# manual page - makes sense only on unix systems
@@ -1,4 +1,8 @@
IF (ENABLE_TESTS)
IF (APPLE)
# override default data path, otherwise looks for Resources in app bundle
SET (QGIS_DATA_SUBDIR "${CMAKE_CURRENT_SOURCE_DIR}/resources")
ENDIF (APPLE)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(bench)
ENDIF (ENABLE_TESTS)

0 comments on commit 07e3c16

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