Skip to content

Commit d50798c

Browse files
committed
Server labeling test fixes
1 parent 9f0ea0c commit d50798c

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

src/server/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ IF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
1010
ADD_DEFINITIONS(-DQGSMSDEBUG=1)
1111
ENDIF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
1212

13+
IF (ENABLE_TESTS)
14+
ADD_DEFINITIONS(-DENABLE_MS_TESTS=1)
15+
ENDIF (ENABLE_TESTS)
16+
1317
########################################################
1418
# Files
1519

src/server/qgis_map_serv.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ int main( int argc, char * argv[] )
313313
QScopedPointer< QgsMapRenderer > theMapRenderer( new QgsMapRenderer );
314314
theMapRenderer->setLabelingEngine( new QgsPalLabeling() );
315315

316-
#ifdef QGSMSDEBUG
316+
#ifdef ENABLE_MS_TESTS
317317
QgsFontUtils::loadStandardTestFonts( QStringList() << "Roman" << "Bold" );
318318
#endif
319319

tests/src/python/test_qgis_local_server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def test_getmap(self):
117117
# chk.setMapRenderer(None)
118118
res = chk.compareImages(test_name, 0, str(img_path))
119119
if QGIS_TEST_REPORT and not res: # don't report ok checks
120-
TESTREPORTS[test_name] = str(chk.report().toLocal8Bit())
120+
TESTREPORTS[test_name] = chk.report()
121121
msg = '\nRender check failed for "{0}"'.format(test_name)
122122
assert res, msg
123123

tests/src/python/test_qgspallabeling_base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def renderCheck(self, mismatch=0, colortol=0, imgpath='', grpprefix=''):
363363
res = chk.runTest(self._Test, mismatch)
364364
if PALREPORT and not res: # don't report ok checks
365365
testname = self._TestGroup + ' . ' + self._Test
366-
PALREPORTS[testname] = str(chk.report().toLocal8Bit())
366+
PALREPORTS[testname] = chk.report()
367367
msg = '\nRender check failed for "{0}"'.format(self._Test)
368368
return res, msg
369369

0 commit comments

Comments
 (0)