diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt index 1e83fe8c17c..712bcfee987 100644 --- a/src/server/CMakeLists.txt +++ b/src/server/CMakeLists.txt @@ -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 diff --git a/src/server/qgis_map_serv.cpp b/src/server/qgis_map_serv.cpp index 89e725101b4..adcbb8bde4f 100644 --- a/src/server/qgis_map_serv.cpp +++ b/src/server/qgis_map_serv.cpp @@ -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 diff --git a/tests/src/python/test_qgis_local_server.py b/tests/src/python/test_qgis_local_server.py index 5454a3cbe90..497d1d3f58f 100644 --- a/tests/src/python/test_qgis_local_server.py +++ b/tests/src/python/test_qgis_local_server.py @@ -117,7 +117,7 @@ class TestQgisLocalServer(TestCase): # 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 diff --git a/tests/src/python/test_qgspallabeling_base.py b/tests/src/python/test_qgspallabeling_base.py index 6ffca77429b..9c474b25114 100644 --- a/tests/src/python/test_qgspallabeling_base.py +++ b/tests/src/python/test_qgspallabeling_base.py @@ -363,7 +363,7 @@ class TestQgsPalLabeling(TestCase): 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