Skip to content

Commit

Permalink
Revert most Mac hacks for testing in favor of 4cfc365
Browse files Browse the repository at this point in the history
- Cleanup of old .qml svg paths to matches other test data .qml
  • Loading branch information
dakcarto committed Aug 26, 2012
1 parent eda71f5 commit 096badd
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 33 deletions.
13 changes: 5 additions & 8 deletions CMakeLists.txt
Expand Up @@ -463,17 +463,14 @@ SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_LIB_SUBDIR})
# if run from the build directory QGIS will detect it and alter the paths
FILE(WRITE ${QGIS_OUTPUT_DIRECTORY}/${QGIS_BIN_SUBDIR}/path.txt "${CMAKE_SOURCE_DIR}\n${QGIS_OUTPUT_DIRECTORY}")

# symlink provider plugins dir for Mac unit tests
# symlink extra provider plugin frameworks for Mac unit tests
IF (APPLE AND ENABLE_TESTS)
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink
"${CMAKE_CURRENT_BINARY_DIR}/Plugins"
"${CMAKE_CURRENT_BINARY_DIR}/output/Plugins")
"${CMAKE_BINARY_DIR}/Plugins/qgis/qgisgrass.framework"
"${CMAKE_BINARY_DIR}/output/lib/qgisgrass.framework")
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")
"${CMAKE_BINARY_DIR}/Plugins/qgis/qgissqlanyconnection.framework"
"${CMAKE_BINARY_DIR}/output/lib/qgissqlanyconnection.framework")
ENDIF (APPLE AND ENABLE_TESTS)

# manual page - makes sense only on unix systems
Expand Down
5 changes: 0 additions & 5 deletions cmake/UsePythonTest.cmake
Expand Up @@ -46,11 +46,6 @@ ELSE(WIN32)
MESSAGE(\"LD_LIBRARY_PATH:\$ENV{LD_LIBRARY_PATH}\")
ENDIF(WIN32)
IF(APPLE)
SET(ENV{QGIS_MAC_PKGDATA_DIR} \"${CMAKE_SOURCE_DIR}\")
SET(ENV{QGIS_MAC_SVG_DIR} \"${CMAKE_SOURCE_DIR}/images/svg\")
ENDIF(APPLE)
MESSAGE(\"PYTHONPATH:\$ENV{PYTHONPATH}\")
MESSAGE(STATUS \"Running ${PYTHON_EXECUTABLE} ${loc} ${wo_semicolon}\")
EXECUTE_PROCESS(
Expand Down
4 changes: 0 additions & 4 deletions tests/CMakeLists.txt
@@ -1,8 +1,4 @@
IF (ENABLE_TESTS)
IF (APPLE)
# override default data path, otherwise looks for Resources in app bundle
SET (QGIS_DATA_SUBDIR "${CMAKE_SOURCE_DIR}/resources")
ENDIF (APPLE)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(bench)
ENDIF (ENABLE_TESTS)
13 changes: 0 additions & 13 deletions tests/src/python/utilities.py
Expand Up @@ -69,19 +69,6 @@ def getQgisTestApp():
myGuiFlag = True # All test will run qgis in gui mode

QGISAPP = QgsApplication(sys.argv, myGuiFlag)

if sys.platform.startswith('darwin'):
# override resource paths, otherwise looks for Resources in app
if 'QGIS_MAC_PKGDATA_DIR' in os.environ:
myPkgPath = os.environ['QGIS_MAC_PKGDATA_DIR']
QGISAPP.setPkgDataPath(myPkgPath)
if 'QGIS_MAC_SVG_DIR' in os.environ:
mySVGPath = os.environ['QGIS_MAC_SVG_DIR']
mySVGPaths = QGISAPP.svgPaths()
# doesn't get rid of incorrect path, just adds correct one
mySVGPaths.prepend(mySVGPath)
QGISAPP.setDefaultSvgPaths(mySVGPaths)

QGISAPP.initQgis()
s = QGISAPP.showSettings()
print s
Expand Down
6 changes: 3 additions & 3 deletions tests/testdata/points_uniquevalue_symbol.qml
Expand Up @@ -30,7 +30,7 @@
<lowervalue>B52</lowervalue>
<uppervalue></uppervalue>
<label></label>
<pointsymbol>svg:/Applications/qgis0.9.2.app/Contents/MacOS/share/qgis/svg/gpsicons/plane.svg</pointsymbol>
<pointsymbol>svg:/gpsicons/plane.svg</pointsymbol>
<pointsize>6</pointsize>
<rotationclassificationfield>1</rotationclassificationfield>
<scaleclassificationfield>2</scaleclassificationfield>
Expand All @@ -45,7 +45,7 @@
<lowervalue>Biplane</lowervalue>
<uppervalue></uppervalue>
<label></label>
<pointsymbol>svg:/Applications/qgis0.9.2.app/Contents/MacOS/share/qgis/svg/gpsicons/plane_orange.svg</pointsymbol>
<pointsymbol>svg:/gpsicons/plane_orange.svg</pointsymbol>
<pointsize>5</pointsize>
<rotationclassificationfield>1</rotationclassificationfield>
<scaleclassificationfield>2</scaleclassificationfield>
Expand All @@ -60,7 +60,7 @@
<lowervalue>Jet</lowervalue>
<uppervalue></uppervalue>
<label></label>
<pointsymbol>svg:/Applications/qgis0.9.2.app/Contents/MacOS/share/qgis/svg/gpsicons/plane.svg</pointsymbol>
<pointsymbol>svg:/gpsicons/plane.svg</pointsymbol>
<pointsize>5</pointsize>
<rotationclassificationfield>1</rotationclassificationfield>
<scaleclassificationfield>2</scaleclassificationfield>
Expand Down

0 comments on commit 096badd

Please sign in to comment.