Navigation Menu

Skip to content

Commit

Permalink
Server labeling test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 16, 2015
1 parent 9f0ea0c commit d50798c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/server/CMakeLists.txt
Expand Up @@ -10,6 +10,10 @@ IF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
ADD_DEFINITIONS(-DQGSMSDEBUG=1)
ENDIF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)

IF (ENABLE_TESTS)
ADD_DEFINITIONS(-DENABLE_MS_TESTS=1)
ENDIF (ENABLE_TESTS)

########################################################
# Files

Expand Down
2 changes: 1 addition & 1 deletion src/server/qgis_map_serv.cpp
Expand Up @@ -313,7 +313,7 @@ int main( int argc, char * argv[] )
QScopedPointer< QgsMapRenderer > theMapRenderer( new QgsMapRenderer );
theMapRenderer->setLabelingEngine( new QgsPalLabeling() );

#ifdef QGSMSDEBUG
#ifdef ENABLE_MS_TESTS
QgsFontUtils::loadStandardTestFonts( QStringList() << "Roman" << "Bold" );
#endif

Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_qgis_local_server.py
Expand Up @@ -117,7 +117,7 @@ def test_getmap(self):
# chk.setMapRenderer(None)
res = chk.compareImages(test_name, 0, str(img_path))
if QGIS_TEST_REPORT and not res: # don't report ok checks
TESTREPORTS[test_name] = str(chk.report().toLocal8Bit())
TESTREPORTS[test_name] = chk.report()
msg = '\nRender check failed for "{0}"'.format(test_name)
assert res, msg

Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_qgspallabeling_base.py
Expand Up @@ -363,7 +363,7 @@ def renderCheck(self, mismatch=0, colortol=0, imgpath='', grpprefix=''):
res = chk.runTest(self._Test, mismatch)
if PALREPORT and not res: # don't report ok checks
testname = self._TestGroup + ' . ' + self._Test
PALREPORTS[testname] = str(chk.report().toLocal8Bit())
PALREPORTS[testname] = chk.report()
msg = '\nRender check failed for "{0}"'.format(self._Test)
return res, msg

Expand Down

0 comments on commit d50798c

Please sign in to comment.