Skip to content

Commit

Permalink
Fix Mac path to resources and grass and sqlanywhere provider framewor…
Browse files Browse the repository at this point in the history
…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 07e3c16
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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.