Skip to content

Commit 07e3c16

Browse files
committed
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
1 parent 5a0fd29 commit 07e3c16

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,12 @@ IF (APPLE AND ENABLE_TESTS)
466466
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink
467467
"${CMAKE_CURRENT_BINARY_DIR}/Plugins"
468468
"${CMAKE_CURRENT_BINARY_DIR}/output/Plugins")
469+
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink
470+
"${CMAKE_CURRENT_BINARY_DIR}/Plugins/qgis/qgisgrass.framework"
471+
"${CMAKE_CURRENT_BINARY_DIR}/output/lib/qgisgrass.framework")
472+
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink
473+
"${CMAKE_CURRENT_BINARY_DIR}/Plugins/qgis/qgissqlanyconnection.framework"
474+
"${CMAKE_CURRENT_BINARY_DIR}/output/lib/qgissqlanyconnection.framework")
469475
ENDIF (APPLE AND ENABLE_TESTS)
470476

471477
# manual page - makes sense only on unix systems

tests/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
IF (ENABLE_TESTS)
2+
IF (APPLE)
3+
# override default data path, otherwise looks for Resources in app bundle
4+
SET (QGIS_DATA_SUBDIR "${CMAKE_CURRENT_SOURCE_DIR}/resources")
5+
ENDIF (APPLE)
26
ADD_SUBDIRECTORY(src)
37
ADD_SUBDIRECTORY(bench)
48
ENDIF (ENABLE_TESTS)

0 commit comments

Comments
 (0)