Fix Mac path to resources and grass and sqlanywhere provider frameworks 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
This commit is contained in:
Larry Shaffer 2012-08-17 15:48:56 -06:00
parent 5a0fd29982
commit 07e3c16c63
2 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -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)